Tag Archives: microsoft
How to fix QuickBook direct deposit not working issue after update?
I have been trying to process pay-roll through Quick-Books, but the direct deposit feature isn’t working. Employees aren’t receiving their payments on time, causing a lot of frustration. I’ve double-checked the account details and everything seems correct. Can you provide a step-by-step solution to fix this issue?
I have been trying to process pay-roll through Quick-Books, but the direct deposit feature isn’t working. Employees aren’t receiving their payments on time, causing a lot of frustration. I’ve double-checked the account details and everything seems correct. Can you provide a step-by-step solution to fix this issue? Read More
How to delete files remotely on Intune devices
Hi All,
Please help me to delete below files at below location remotely on all intune devices.
%appdata%Microsoftusertemplateswordtemplate1.dotx
%appdata%Microsoftusertemplateswordtemplate1.dotm
Thank you
Hi All, Please help me to delete below files at below location remotely on all intune devices.%appdata%Microsoftusertemplateswordtemplate1.dotx%appdata%Microsoftusertemplateswordtemplate1.dotmThank you Read More
i want to learn new thing and every thin in exel
Hi everyone my name is Lateef Adewale,
Field Engineer @ cool continental technical solution company in Nigeria
Good day to you all my community experts,
My mission is to become an EXCEL Expert
My vision is to make Microsoft and this community, proud that we thought him.
thanks to everyone.
Hi everyone my name is Lateef Adewale, Field Engineer @ cool continental technical solution company in NigeriaGood day to you all my community experts,My mission is to become an EXCEL Expert My vision is to make Microsoft and this community, proud that we thought him. thanks to everyone. Read More
One drive from business to sharepoint online site migration within same Microsoft tenant
Hi All,
I would like to migrate data from one drive from business to sharepoint site online within same tenant with sharing links intact and permissions. i tried copy to… function but we lost the sharing and permissions assigned to those folders. is there a recommended and reliable way to achieve this scenerio.
Thanks & Regards,
Vipin
Hi All,I would like to migrate data from one drive from business to sharepoint site online within same tenant with sharing links intact and permissions. i tried copy to… function but we lost the sharing and permissions assigned to those folders. is there a recommended and reliable way to achieve this scenerio. Thanks & Regards,Vipin Read More
How to fix QuickBook pay-roll not working issue after update?
I’ve been experiencing issues with Quick-Books pay-roll not working properly. It fails to process pay-roll, and I keep getting error messages. This has been causing delays in paying my employees on time. What could be causing this problem, and how can I fix it? Any guidance would be greatly appreciated!
I’ve been experiencing issues with Quick-Books pay-roll not working properly. It fails to process pay-roll, and I keep getting error messages. This has been causing delays in paying my employees on time. What could be causing this problem, and how can I fix it? Any guidance would be greatly appreciated! Read More
Running Phi-3-vision via ONNX on Jetson Platform
Hi, I’m Jambo a Microsoft Learn Student Ambassador.
This article aims to run the quantized Phi-3-vision model in ONNX format on the Jetson platform and successfully perform inference for image+text dialogue tasks.
What is Jetson?
The Jetson platform, introduced by NVIDIA, consists of small arm64 devices equipped with powerful GPU computing capabilities. Designed specifically for edge computing and AI applications, Jetson devices run on Linux, enabling complex computing tasks with low power consumption. This makes them ideal for developing embedded AI and machine learning projects.
For other versions of the Phi-3 model, we can use llama.cpp to convert them into GUFF format to run on Jetson, and easily switch between different quantizations. Alternatively, you can conveniently use services like ollama or llamaedge which are based on llama.cpp. More information can be found in the Phi-3CookBook.
However, for the vision version, there is currently no way to convert it into GUFF format (#7444). Additionally, resource-constrained edge devices struggle to run the original model without quantization via transformers. Therefore, we can use ONNX Runtime to run the quantized model in ONNX format.
What is ONNX Runtime?
ONNX Runtime is a high-performance inference engine designed to accelerate and execute AI models in the ONNX (Open Neural Network Exchange) format. The onnxruntime-genai is an API specifically built for LLM (Large Language Model) models, providing a simple way to run models like Llama, Phi, Gemma, and Mistral.
At the time of writing this article, onnxruntime-genai does not have a precompiled version for aarch64 + GPU, so we need to compile it ourselves.
Compiling onnxruntime-genai
Environment
Jetpack 6.0 [L4T 36.3.0]
Compilation platform: Jetson Orin
Inference platform: Jetson Orin Nano
Cloning the onnxruntime-genai Repository
git clone https://github.com/microsoft/onnxruntime-genai
cd onnxruntime-genai
Installing ONNX Runtime
Download the aarch64 version of ONNX Runtime from the GitHub releases page and extract the header files and necessary library files.
Note: Ensure you download the aarch64 version. If there is a newer version, you can replace the version number in the link.
wget https://github.com/microsoft/onnxruntime/releases/download/v1.18.1/onnxruntime-linux-aarch64-1.18.1.tgz
tar -xvf onnxruntime-linux-aarch64-1.18.1.tgz
mv onnxruntime-linux-aarch64-1.18.1 ort
ONNX Runtime does not provide a precompiled version for aarch64 + GPU, but we can get the required library files from the dusty-nv image.
The following commands will copy the required library files from the dusty-nv image to the ort/lib directory.
id=$(docker create dustynv/onnxruntime:r36.2.0)
docker cp $id:/usr/local/lib/libonnxruntime*.so* – > ort/lib/
docker rm -v $id
Compiling onnxruntime-genai
You should still be in the onnxruntime-genai directory at this point.
Now we need to prepare to build the Python API. You can use Python >=3.6 for the compilation. JetPack 6.0 comes with Python 3.10 by default, but you can switch to other versions for the compilation. The compiled whl can only be installed on the Python version used during the compilation.
Note: The compilation process will require a significant amount of memory. Therefore, if your Jetson device has limited memory (like the Orin NX), do not use the –parallel parameter.
python3 build.py –use_cuda –cuda_home /usr/local/cuda-12.2 –skip_tests –skip_csharp [–parallel]
The compiled files will be located in the build/Linux/Release/dist/wheel directory, and we only need the .whl file.
You can copy the whl file to other Jetson platforms with the same environment (CUDA) for installation.
Note: The generated subdirectory may differ, but we only need the .whl file from the build directory.
Installing onnxruntime-genai
If you have multiple CUDA versions, you might need to set the CUDA_PATH environment variable to ensure it points to the same version used during compilation.
export CUDA_PATH=/usr/local/cuda-12.2
Navigate to the directory where the whl file is located, or copy the whl file to another directory for installation using the following command.
pip3 install *.whl
Running the Phi-3-vision Model
Downloading the Model
Download the Phi-3-vision model for onnx-cuda from huggingface.
pip3 install huggingface-hub[cli]
The FP16 model requires 8 GB of VRAM. If you are running on a device with more resources like the Jetson Orin, you can opt for the FP32 model.
The Int 4 model is a quantized version, requiring only 3 GB of VRAM. This is suitable for more compact devices like the Jetson Orin Nano.
huggingface-cli download microsoft/Phi-3-vision-128k-instruct-onnx-cuda –include cuda-fp16/* –local-dir .
# Or
huggingface-cli download microsoft/Phi-3-vision-128k-instruct-onnx-cuda –include cuda-int4-rtn-block-32/* –local-dir .
Running the Example Script
Download the official example script and an example image.
# Download example script
wget https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/phi3v.py
# Download example image
wget https://onnxruntime.ai/images/table.png
Run the example script.
python3 phi3v.py -m cuda-int4-rtn-block-32
First, input the path to the image, for example, table.png.
Next, input the prompt text, for example: Convert this image to markdown format.
“`markdown
| Product | Qtr 1 | Qtr 2 | Grand Total |
|———————|———-|———-|————-|
| Chocolade | $744.60 | $162.56 | $907.16 |
| Gummibarchen | $5,079.60| $1,249.20| $6,328.80 |
| Scottish Longbreads | $1,267.50| $1,062.50| $2,330.00 |
| Sir Rodney’s Scones | $1,418.00| $756.00 | $2,174.00 |
| Tarte au sucre | $4,728.00| $4,547.92| $9,275.92 |
| Chocolate Biscuits | $943.89 | $349.60 | $1,293.49 |
| Total | $14,181.59| $8,127.78| $22,309.37 |
“`
The table lists various products along with their sales figures for Qtr 1, Qtr 2, and the Grand Total. The products include Chocolade, Gummibarchen, Scottish Longbreads, Sir Rodney’s Scones, Tarte au sucre, and Chocolate Biscuits. The Grand Total column sums up the sales for each product across the two quarters.
Note: The first round of dialogue during script execution might be slow, but subsequent dialogues will be faster.
We can use Jtop to monitor resource usage:
The above inference is run on Jetson Orin Nano using the Int 4 quantized model. As shown, the Python process occupies 5.4 GB of VRAM for inference, with minimal CPU load and nearly full GPU utilization during inference.
We can modify the example script to use the time function at key points to measure the inference speed, which is remarkably fast.
All of this is achieved on a device with a power consumption of just 15W.
Microsoft Tech Community – Latest Blogs –Read More
View Rights with specific Link
Hello,
I have a Share Point where I save Data from users which can add and change data with a Powerapp and now I want to add that users can got to the SharePoint and can view everything.
Now is my Question if it is even possible to let still the people add and change the data over the Powerapp and be able if they use a Specific link they can only view the Data?
Best wishes and Thanks in regards
Hello,I have a Share Point where I save Data from users which can add and change data with a Powerapp and now I want to add that users can got to the SharePoint and can view everything. Now is my Question if it is even possible to let still the people add and change the data over the Powerapp and be able if they use a Specific link they can only view the Data?Best wishes and Thanks in regards Read More
How Can I Fix Quick-Books Pay-roll Tax Table Not Updating on Windows?
I am experiencing issues with my Quick-Books Pay-roll Tax Table not updating on my Windows system. Whenever I attempt to update, the process either fails or results in an error message. I’ve tried restarting Quick-Books and my computer, but the problem persists. Can someone guide me through the steps to fix this issue? Are there any specific settings I need to check or updates I need to install to ensure the tax table updates correctly? Any help would be greatly appreciated!
I am experiencing issues with my Quick-Books Pay-roll Tax Table not updating on my Windows system. Whenever I attempt to update, the process either fails or results in an error message. I’ve tried restarting Quick-Books and my computer, but the problem persists. Can someone guide me through the steps to fix this issue? Are there any specific settings I need to check or updates I need to install to ensure the tax table updates correctly? Any help would be greatly appreciated! Read More
How to create 1099 forms in QBO (Online Accounting Software) : Looking for help??
I need assistance creating 1099 forms in QBO. I followed the steps to prepare my vendor list and categorize payments, but I’m unsure if I’m doing it correctly. My concerns include ensuring all vendor information is accurate, the correct payments are included, and the forms are filed properly. I need a step-by-step guide or support session to help me through the process to ensure compliance with tax regulations.
I need assistance creating 1099 forms in QBO. I followed the steps to prepare my vendor list and categorize payments, but I’m unsure if I’m doing it correctly. My concerns include ensuring all vendor information is accurate, the correct payments are included, and the forms are filed properly. I need a step-by-step guide or support session to help me through the process to ensure compliance with tax regulations. Read More
How Do I Resolve Quick-Books Error PS036 When Downloading Pay-roll Updates?
I am encountering Quick-Books Error PS036 whenever I try to download pay-roll updates. This error prevents me from completing the update process, and I’m unsure how to resolve it. I’ve checked my pay-roll subscription status and tried restarting Quick-Books, but the issue persists. Could someone provide detailed steps to fix Error PS036 and successfully download pay-roll updates? Any advice or solutions would be highly appreciated!
I am encountering Quick-Books Error PS036 whenever I try to download pay-roll updates. This error prevents me from completing the update process, and I’m unsure how to resolve it. I’ve checked my pay-roll subscription status and tried restarting Quick-Books, but the issue persists. Could someone provide detailed steps to fix Error PS036 and successfully download pay-roll updates? Any advice or solutions would be highly appreciated! Read More
Custom Addin disappearing when reply/new mail in preview pane
We are facing issue with Outlook Add-in, The custom add-in disappears when draft new mail or reply for a mail in preview pane(or reading pane). If the user selects the “pop out” option on the email, then Add-in tab reappears.
Is there way to to show Add-in tab even in preview pane for new draft mail?
Attached screenshots for reference.
Ravi Nalla
We are facing issue with Outlook Add-in, The custom add-in disappears when draft new mail or reply for a mail in preview pane(or reading pane). If the user selects the “pop out” option on the email, then Add-in tab reappears. Is there way to to show Add-in tab even in preview pane for new draft mail? Attached screenshots for reference.Ravi Nalla Read More
How Do I Fix Quick-Books Pay-roll Update Error 15270 on Windows 10/11?
I’m encountering Q.B Pay-roll Update Error 15270 on Windows 10/11. This error prevents the pay-roll update from completing, and I’ve tried restarting both Quick-Books and my computer with no success. Could someone provide guidance on how to resolve Error 15270? Any detailed steps or solutions would be greatly appreciated!
I’m encountering Q.B Pay-roll Update Error 15270 on Windows 10/11. This error prevents the pay-roll update from completing, and I’ve tried restarting both Quick-Books and my computer with no success. Could someone provide guidance on how to resolve Error 15270? Any detailed steps or solutions would be greatly appreciated! Read More
Need a powershell script to delete a word document on intune devices
Hi All,
I am trying to delete a word document on all intune devices. I have tried below but did not work.
Get-ChildItem -Path “%appdata%Microsoftusertemplates” -Filter “WordTemplate-2.dotm” -Recurse | Remove-Item
Get-ChildItem -Path “%appdata%Microsoftusertemplates” -Filter “WordTemplate-2.dotx” -Recurse | Remove-Item
Could you please assist me providing a full powershell script that will work and remove the above files at above location on all the intune devices remotely.
Thanks.
Hi All, I am trying to delete a word document on all intune devices. I have tried below but did not work.Get-ChildItem -Path “%appdata%Microsoftusertemplates” -Filter “WordTemplate-2.dotm” -Recurse | Remove-ItemGet-ChildItem -Path “%appdata%Microsoftusertemplates” -Filter “WordTemplate-2.dotx” -Recurse | Remove-ItemCould you please assist me providing a full powershell script that will work and remove the above files at above location on all the intune devices remotely.Thanks. Read More
How Can I Resolve Q.B Error 15106 When Trying to Update Pay-roll?
Has anyone dealt with Q.B Pay-roll Error 15106? I’m encountering this error whenever I try to update my pay-roll. The error message suggests that the update program is damaged or not accessible. I’ve tried restarting my computer and running Q.B as an administrator, but nothing seems to work. Does anyone have a solution for fixing Error 15106? Any advice would be greatly appreciated!
Has anyone dealt with Q.B Pay-roll Error 15106? I’m encountering this error whenever I try to update my pay-roll. The error message suggests that the update program is damaged or not accessible. I’ve tried restarting my computer and running Q.B as an administrator, but nothing seems to work. Does anyone have a solution for fixing Error 15106? Any advice would be greatly appreciated! Read More
Sage 50 connection manager download, install and update on server
One common problem users face is difficulty establishing a stable connection between Sage 50 and their company files. This could be due to network issues, firewall settings, or software conflicts. Troubleshooting these factors can help resolve connectivity issues and get you back on track.
One common problem users face is difficulty establishing a stable connection between Sage 50 and their company files. This could be due to network issues, firewall settings, or software conflicts. Troubleshooting these factors can help resolve connectivity issues and get you back on track. Read More
How to set up and use QuickBook𝓼 Workforce to see pay stubs
After accepting the invitation, employees can sign in to QuickBook𝔰 Workforce by navigating to the website at workforce.intuit.com. They will need to enter the email address and password associated with their Intuit account. If an employee is having trouble signing in, there are a few troubleshooting steps they can take.
After accepting the invitation, employees can sign in to QuickBook𝔰 Workforce by navigating to the website at workforce.intuit.com. They will need to enter the email address and password associated with their Intuit account. If an employee is having trouble signing in, there are a few troubleshooting steps they can take. Read More
Missing stock ABDL in excel stock database
Unable to find Allied Blenders And Distillers Ltd. in NSE, India, and BSE, India.
COMPANY NAME
Allied Blenders And Distillers Ltd.
EXCHANGE
NSE: ABDL BSE: 544203
Unable to find Allied Blenders And Distillers Ltd. in NSE, India, and BSE, India.COMPANY NAMEAllied Blenders And Distillers Ltd. EXCHANGENSE: ABDL BSE: 544203 Read More
Cannot accept partner agreement
Hi there, I cannot accept the support agreement.
I am trying to accept the Microsoft AI Cloud Partner Agreement. My company is found using the auto lookup and when I get to press the “Accept and Continue” below the legal contact info it loads for half a second and stops.
I have tried different computers and browsers. I have tried using the self help but without this step being completed I can’t get further help using the automated support
Any assistance would be much appreciated!
Hi there, I cannot accept the support agreement. I am trying to accept the Microsoft AI Cloud Partner Agreement. My company is found using the auto lookup and when I get to press the “Accept and Continue” below the legal contact info it loads for half a second and stops.I have tried different computers and browsers. I have tried using the self help but without this step being completed I can’t get further help using the automated support Any assistance would be much appreciated! Read More
Export History List Item Sharepoint
Hi Everyone,
please inform, how to export excel version history list item in sharepoint online 365?
thank you.
Hi Everyone, please inform, how to export excel version history list item in sharepoint online 365? thank you. Read More
Help creating Microsoft 365 Groups via Graph
Can anyone tell me what I’m doing wrong in regards to the dynamic group filter?
Here is my script followed by the error message. When I have the WhatIf statement in, the csv files are populated correctly and there is no error. When I remove the whatif and the group creation is attempted I get the error.
# Import necessary modules
Import-Module ActiveDirectory
Import-Module Microsoft.Graph.Groups
# Connect to Microsoft Graph
Connect-MgGraph -Scopes “Group.ReadWrite.All”
# Fetch managers
$managers = Get-ADUser -Filter “Title -eq ‘Sales Manager'” -SearchBase “OU=Sales Managers,OU=User Accounts – Head Office,DC=contoso,DC=com”” -Properties extensionAttribute5
# Loop through each manager
foreach ($manager in $managers) {
if ([string]::IsNullOrEmpty($manager.extensionAttribute5)) {
continue
}
$firstName = $manager.Name.Split(‘ ‘)[0]
# Define group details and OUs for potential members
$groupDetails = @{
“Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = $null; Title = $null }
“Program” = @{ OU = “OU=User Accounts – Program Locations,DC=contoso,DC=com”; Department = $null; Title = $null }
“Sales Program” = @{ OU = “OU=User Accounts – Program Locations,DC=contoso,DC=com”; Department = “Sales Program”; Title = $null }
“Marketing Program” = @{ OU = “OU=User Accounts – Program Locations,DC=contoso,DC=com”; Department = “Marketing Program”; Title = $null }
“Sales Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = “Sales”; Title = $null }
“Marketing Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = “Marketing”; Title = $null }
“Temp Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = “Temp”; Title = $null }
“Directors” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = $null; Title = “Director” }
}
foreach ($groupKey in $groupDetails.Keys) {
$groupInfo = $groupDetails[$groupKey]
$groupName = “District $($manager.extensionAttribute5) $groupKey Group ($firstName)”
$emailAlias = “District-$($manager.extensionAttribute5)-$groupKey-Group”.Replace(” “, “-“).Replace(“,”, “”).Replace(“(“, “”).Replace(“)”, “”)
# Determine the filter based on group requirements
$filter = “extensionAttribute5 -eq ‘$($manager.extensionAttribute5)'”
if ($groupInfo.Department) {
$filter += ” -and Department -eq ‘$($groupInfo.Department)'”
}
if ($groupInfo.Title) {
$filter += ” -and Title -like ‘*$($groupInfo.Title)*'”
}
# Fetch potential group members
$members = Get-ADUser -Filter $filter -SearchBase $groupInfo.OU -Properties Title, Department, extensionAttribute5, physicalDeliveryOfficeName
# Export members to CSV
$csvPath = “C:temp$groupName.csv”
$members | Select-Object Name, extensionAttribute5, Department, physicalDeliveryOfficeName, Title | Export-Csv -Path $csvPath -NoTypeInformation
# Debug output to check parameter values
Write-Host “Group Name: $groupName”
Write-Host “Email Alias: $emailAlias”
Write-Host “Membership Rule: $MembershipRule”
# Simulate group creation
New-MgGroup -DisplayName $groupName -Description “Dynamic Microsoft 365 group created by Contoso PS Script” `
-MailEnabled:$True -SecurityEnabled:$False `
-MailNickname $emailAlias -GroupTypes “DynamicMembership”, “Unified” `
-MembershipRule “user.extensionAttribute5 -eq ‘$($manager.extensionAttribute5)'” -MembershipRuleProcessingState “On”
}
}
Error is:
Group Name: District 1 Program Group (Cheeto)
Email Alias: District-1-Program-Group
Membership Rule:
New-MgGroup : Invalid characters found in the rule: ‘ ‘
Status: 400 (BadRequest)
ErrorCode: InvalidCharactersException
Date: 2024-07-19T04:39:59
Headers:
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 80ccb81b-1052-4915-a03b-e35604ec15a2
client-request-id : d31d414b-5abc-4946-a800-a2be43a86fca
x-ms-ags-diagnostic : {“ServerInfo”:{“DataCenter”:”US
Central”,”Slice”:”E”,”Ring”:”3″,”ScaleUnit”:”000″,”RoleInstance”:”TO1PEPF0000542E”}}
Date : Fri, 19 Jul 2024 04:39:58 GMT
At C:UserscontosoadminDocumentsM365-bulk-group-creation.ps1:60 char:58
+ … “user.extensionAttribute5 -eq ‘$($manager.extensionAttribute5)'” -Mem …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ Headers = , b…oftGraphGroup }:<>f__AnonymousType2`2) [New-MgGroup_Crea
teExpanded], Exception
+ FullyQualifiedErrorId : InvalidCharactersException,Microsoft.Graph.PowerShell.Cmdlets.NewMgGroup_CreateExpanded
Thank you,
B
Can anyone tell me what I’m doing wrong in regards to the dynamic group filter?Here is my script followed by the error message. When I have the WhatIf statement in, the csv files are populated correctly and there is no error. When I remove the whatif and the group creation is attempted I get the error. # Import necessary modules
Import-Module ActiveDirectory
Import-Module Microsoft.Graph.Groups
# Connect to Microsoft Graph
Connect-MgGraph -Scopes “Group.ReadWrite.All”
# Fetch managers
$managers = Get-ADUser -Filter “Title -eq ‘Sales Manager'” -SearchBase “OU=Sales Managers,OU=User Accounts – Head Office,DC=contoso,DC=com”” -Properties extensionAttribute5
# Loop through each manager
foreach ($manager in $managers) {
if ([string]::IsNullOrEmpty($manager.extensionAttribute5)) {
continue
}
$firstName = $manager.Name.Split(‘ ‘)[0]
# Define group details and OUs for potential members
$groupDetails = @{
“Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = $null; Title = $null }
“Program” = @{ OU = “OU=User Accounts – Program Locations,DC=contoso,DC=com”; Department = $null; Title = $null }
“Sales Program” = @{ OU = “OU=User Accounts – Program Locations,DC=contoso,DC=com”; Department = “Sales Program”; Title = $null }
“Marketing Program” = @{ OU = “OU=User Accounts – Program Locations,DC=contoso,DC=com”; Department = “Marketing Program”; Title = $null }
“Sales Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = “Sales”; Title = $null }
“Marketing Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = “Marketing”; Title = $null }
“Temp Staff” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = “Temp”; Title = $null }
“Directors” = @{ OU = “OU=User Accounts – Field Staff,DC=contoso,DC=com”; Department = $null; Title = “Director” }
}
foreach ($groupKey in $groupDetails.Keys) {
$groupInfo = $groupDetails[$groupKey]
$groupName = “District $($manager.extensionAttribute5) $groupKey Group ($firstName)”
$emailAlias = “District-$($manager.extensionAttribute5)-$groupKey-Group”.Replace(” “, “-“).Replace(“,”, “”).Replace(“(“, “”).Replace(“)”, “”)
# Determine the filter based on group requirements
$filter = “extensionAttribute5 -eq ‘$($manager.extensionAttribute5)'”
if ($groupInfo.Department) {
$filter += ” -and Department -eq ‘$($groupInfo.Department)'”
}
if ($groupInfo.Title) {
$filter += ” -and Title -like ‘*$($groupInfo.Title)*'”
}
# Fetch potential group members
$members = Get-ADUser -Filter $filter -SearchBase $groupInfo.OU -Properties Title, Department, extensionAttribute5, physicalDeliveryOfficeName
# Export members to CSV
$csvPath = “C:temp$groupName.csv”
$members | Select-Object Name, extensionAttribute5, Department, physicalDeliveryOfficeName, Title | Export-Csv -Path $csvPath -NoTypeInformation
# Debug output to check parameter values
Write-Host “Group Name: $groupName”
Write-Host “Email Alias: $emailAlias”
Write-Host “Membership Rule: $MembershipRule”
# Simulate group creation
New-MgGroup -DisplayName $groupName -Description “Dynamic Microsoft 365 group created by Contoso PS Script” `
-MailEnabled:$True -SecurityEnabled:$False `
-MailNickname $emailAlias -GroupTypes “DynamicMembership”, “Unified” `
-MembershipRule “user.extensionAttribute5 -eq ‘$($manager.extensionAttribute5)'” -MembershipRuleProcessingState “On”
}
} Error is:Group Name: District 1 Program Group (Cheeto)Email Alias: District-1-Program-GroupMembership Rule:New-MgGroup : Invalid characters found in the rule: ‘ ‘Status: 400 (BadRequest)ErrorCode: InvalidCharactersExceptionDate: 2024-07-19T04:39:59Headers:Transfer-Encoding : chunkedVary : Accept-EncodingStrict-Transport-Security : max-age=31536000request-id : 80ccb81b-1052-4915-a03b-e35604ec15a2client-request-id : d31d414b-5abc-4946-a800-a2be43a86fcax-ms-ags-diagnostic : {“ServerInfo”:{“DataCenter”:”USCentral”,”Slice”:”E”,”Ring”:”3″,”ScaleUnit”:”000″,”RoleInstance”:”TO1PEPF0000542E”}}Date : Fri, 19 Jul 2024 04:39:58 GMTAt C:UserscontosoadminDocumentsM365-bulk-group-creation.ps1:60 char:58+ … “user.extensionAttribute5 -eq ‘$($manager.extensionAttribute5)'” -Mem …+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidOperation: ({ Headers = , b…oftGraphGroup }:<>f__AnonymousType2`2) [New-MgGroup_CreateExpanded], Exception+ FullyQualifiedErrorId : InvalidCharactersException,Microsoft.Graph.PowerShell.Cmdlets.NewMgGroup_CreateExpanded Thank you, B Read More