Change Product Key of Windows Server 2022 using Ansible and/or PowerShell script
Hi there, I am trying to automate the process of provisioning a Windows Server based Virtual Machine using Azure and Ansible. My company has some Windows Server product keys available through the Microsoft Partner Program. My goal is to use one of these…
How to execute System.Windows.Forms as ServiceNotification or DefaultDesktopOnly
We are working on the PowerShell to Pop out message forms to the user Accounts and we are using Add-Type -AssemblyName System.Windows.Forms to create the user interactive messages. We are currently using the SCCM to deploy the PowerShell script across…
How to download group report in MIM system. Using powershell command or is there other way to download the data.
Hello all, How to download group report. Including Displayed Owner, Owner, alias, Account Name, Display Name, Members. Is there powershell script? Thank you.
Permissions assigned with Grant-PnPAzureADAppSitePermission on a site do not work with custom or non-inherited security.
Good afternoon. When you create the document library and leave it securely inheriting from the main site and allowing you to create folders and files without problems with Add-PnPFolder and Add-PnPFile. But I disinherited the document library permissions…
Add exact upns
Hi All i have userprincipalnames in a csv file in the below format. usernames user1@contoso.com user2@contoso.com i want to add these users to AD group from powershell. if there are any other user with user1.a@contoso.com or user2.a@contoso.com. i…
How to use ForEach-Object -Parallel in Azure Devops Pipeline Agent.
I want to use a PowerShell script which has below cmdlet. When I tried to use MS Hosted Pipeline agent with Parallel feature I'm getting "Parameter set cannot be resolved using the specified named parameters" error. How can I execute the…
How to execute System.Windows.Forms from the System Account using Task Scheduler
Hello Experts We are working on the PowerShell to Pop out message forms to the user Accounts and we are using Add-Type -AssemblyName System.Windows.Forms to create the user interactive messages. We are currently using the SCCM to deploy the PowerShell…
Getting all users profile photo metadata via Get-MgUser
Hi all, I want to get all users profile photo's metadata via Graph API. I am aware you can get all users, then one by one get the profile photo metadata, like this using Graph Powershell SDK: $allMgUsers = Get-MgUser -All $allMgUsersPhotoMetadata =…
Does Dsregcmd \leave uneroll Win 11 device from intune??
Hi experts We have a Windows 11 device which is Hybrid joined as well as Co-Managed. We want to remove the device from the Intune. We are running the DSREGCMD /Leave command to unjoin the from hybrid. after this the device object is deleted from the…
Deleting Storage Account Pending Migration to SRP in Powershell
After much research on these forums and online in general, I'm trying to run the following two commands in attempt to delete a storage account that is pending migration to SRP: Move-AzureStorageAccount-Abort -StorageAccountName…
How to onboard On-premise Windows Servers on Azure Arc on scale using PowerShell (PSSession)
We are planning to onboard our on-premises Windows Server (lowest version is 2012 R2) to Azure Arc on a scale (Approx. 400 Servers). We downloaded PS script from Azure Arc and ran from one of the servers to other remote servers using PS Session to…
powershell to get all users and their managers recursively
I am looking to pull all Active Directory users and their managers all the way up to the chain. I get how to do get-aduser -filter * -properties * | select name, manager export-csv -path "csv path" I also get: $Users = Get-ADUser -filter *…
Using Get-MgUser to query on multiple -Search criteria
I am attempting to replicate a Get-AzureADUser command using Get-MgUser. The previous command (Get-AzureADUser -Top 5000 | Where-Object {($.AccountEnabled -eq "True") -and (($.CompanyName -eq "CompA" -or $.CompanyName -eq…
How to trace unread emails status in specific time/date range for all users in Exchange On-prem
Hello Team, I have a case where customer request an assistant to trace all unread emails with specific time range in their organization. Is there any way to perform this activity at one go? Any PowerShell script I can find? Environment is Exchange…
Sending email though powershell with Microsoft Graph
I am using the following powershell script to test the functionality of email notification using Microsoft Graph. The emai script sends the email but in the inbox of the receiver I am getting a failed delivery. # Configuration $clientId = " " …
Is it possible to have a Power Automate Flow create a onedrive sync of a specific folder? Or PowerShell script?
Is it possible to create a Power Automate Flow to do the following: Click a button Power Automate form appears Form requests a name of a folder from the user. User enters an existing folder name in a SharePoint Online Library. OneDrive Opens if not…
Windows Powershell Suddenly pops and uses too much RAM. How do I resolve this?
Hi I'm Using an HP Victus Laptop. I have attached a screenshot of the device model and its information. Probleme : The Windows powershell sudennly pops up out of nowhere and it runs as a background process.To close it I have to use taskmanager to end…
export the output
Hi all i want to execute the below syntax on few servers and i have created a collection and added the Servers to it. When i execute manually from powershell i get the output but i want to export that output to a text file under c:\windows\Temp folder.…
Intune PowerShell - Enforce script signature check
Could someone explain the PowerShell script Enforce script signature check in the Intune Portal? https://intune.microsoft.com/#view/Microsoft_Intune_DeviceSettings/DevicesMenu/~/powershell There isn't any documentation or instructional piece available…
Cannot run "Connect-AipService"
This is the error I get after runinng these commands Update-Module -Name AIPService PS /home/aggie> (Get-Module AIPService –ListAvailable).Version Major Minor Build Revision 3 0 0 1 The following error I get when I run…