2,099 questions with PowerShell-related tags

Sort by: Updated
1 answer

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…

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,186 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,202 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,388 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-30T07:44:01.64+00:00
Erik Burmester 0 Reputation points
commented 2024-05-03T05:56:18.8433333+00:00
Nehruji R 2,126 Reputation points Microsoft Vendor
0 answers

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…

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,269 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-05-02T17:09:58.89+00:00
Prabhjot Singh 145 Reputation points
commented 2024-05-03T04:47:33.6433333+00:00
Prabhjot Singh 145 Reputation points
2 answers

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.

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
621 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-02-01T08:46:09.1066667+00:00
commented 2024-05-02T23:15:37.6533333+00:00
Pat Nish 0 Reputation points
1 answer

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…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,728 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,949 questions
asked 2024-04-25T22:52:10.33+00:00
Jairo Javier Baleta Cali 106 Reputation points
commented 2024-05-02T23:01:00.94+00:00
Jairo Javier Baleta Cali 106 Reputation points
2 answers

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…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,479 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,388 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,929 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,388 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-30T18:33:23.3266667+00:00
Glenn Maxwell 10,146 Reputation points
edited a comment 2024-05-02T18:57:10.3333333+00:00
Rich Matheisen 45,096 Reputation points
1 answer

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…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,388 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-30T15:59:10.87+00:00
Ramakrishna Abhijeet P 70 Reputation points
commented 2024-05-02T18:41:29.0066667+00:00
Rich Matheisen 45,096 Reputation points
1 answer

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…

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,269 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-05-02T15:47:45.7766667+00:00
Anant Bera 86 Reputation points
edited a comment 2024-05-02T16:11:35.1833333+00:00
Anant Bera 86 Reputation points
1 answer

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 =…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,708 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-05-02T13:21:34.3033333+00:00
Marc Hendrichsen 5 Reputation points
answered 2024-05-02T13:43:03.16+00:00
Marc Hendrichsen 5 Reputation points
1 answer

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…

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,269 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,397 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-25T08:57:41.8933333+00:00
Anant Bera 86 Reputation points
commented 2024-05-02T08:32:58.85+00:00
Yanhong Liu 2,560 Reputation points Microsoft Vendor
1 answer

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…

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,721 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-29T21:46:30.1633333+00:00
806572387 0 Reputation points
commented 2024-05-02T07:42:43.89+00:00
Nehruji R 2,126 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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…

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
332 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,202 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,929 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-08T07:59:34.7366667+00:00
Bishnu Baliyase 130 Reputation points
accepted 2024-05-02T04:29:33.4533333+00:00
Bishnu Baliyase 130 Reputation points
2 answers One of the answers was accepted by the question author.

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 *…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,929 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,388 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-30T13:24:36.5566667+00:00
Michael-5966 20 Reputation points
commented 2024-05-01T20:31:40.68+00:00
Michael-5966 20 Reputation points
1 answer

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…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-05-01T18:20:23.29+00:00
Mongoose 36 Reputation points
answered 2024-05-01T19:38:54.68+00:00
Mongoose 36 Reputation points
1 answer

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…

Microsoft Exchange Online
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,094 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
515 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
395 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-01-23T07:59:27.5166667+00:00
Damien Koh (International Supplier) 0 Reputation points Microsoft Vendor
answered 2024-05-01T13:06:08.2866667+00:00
Martin Ilesanmi 5 Reputation points
1 answer

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 = " " …

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,708 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
515 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2023-08-03T21:32:07.1033333+00:00
Calvin Quint 0 Reputation points
commented 2024-05-01T10:30:59.7266667+00:00
Marten Jacobs 0 Reputation points
3 answers One of the answers was accepted by the question author.

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…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,728 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-25T18:07:58.09+00:00
Rohman, William T 20 Reputation points
accepted 2024-05-01T10:25:57.31+00:00
Rohman, William T 20 Reputation points
3 answers One of the answers was accepted by the question author.

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…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2023-08-21T13:50:38.34+00:00
Sughosh S V 40 Reputation points
accepted 2024-05-01T02:24:57.0666667+00:00
Sughosh S V 40 Reputation points
4 answers

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.…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,388 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
907 questions
Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
459 questions
Microsoft Configuration Manager
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2024-04-24T05:05:14.7+00:00
Rising Flight 3,771 Reputation points
commented 2024-04-30T21:24:34.4966667+00:00
Rich Matheisen 45,096 Reputation points
4 answers

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…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,708 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,388 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,732 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,397 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
asked 2023-11-29T01:41:23.4466667+00:00
EnterpriseArchitect 4,826 Reputation points
answered 2024-04-30T16:42:38.88+00:00
Andrew parle 0 Reputation points
1 answer

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…

Azure Information Protection
Azure Information Protection
An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
519 questions
Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
948 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,099 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,949 questions
asked 2024-04-26T15:27:49.8766667+00:00
AT 0 Reputation points
commented 2024-04-30T16:10:13.0466667+00:00
AT 0 Reputation points