How to deploy PowerShell 7 using Group Policy
Published December 23, 2023 by Danny Moran
Table of Contents
Introduction
Learn how to deploy PowerShell 7 to Windows Servers using Group Policy. In this example, I show you how to download the PowerShell 7 MSI and then how to setup Group Policy to deploy the install package to servers within organisational units.
Video
Downloads
Instructions
Go to the download page linked above and download the PowerShell 7 MSI installation files.
Copy the MSI installation package to a shared location that all servers and users can access.
Note: I recommend using the Active Directory SYSVOL shared folder and creating a software folder within that shared folder.
\\LOCALDOMAINNAME\SYSVOL\LOCALDOMAINNAME\software
Open the Group Policy Management Console.
Note: You can run
gpmc.msc
to open the management console.Select Group Policy Objects and then right-click and press New to create a new GPO.
Enter a descriptive name for your GPO such as deploy-powershell-7 and then press OK to create the GPO.
Right-click and press Edit on the deploy-powershell-7 GPO.
In the GPO Editor, navigate to:
Computer Configuration > Policies > Software Settings > Software installation
Right-click the Software installation tab and select Properties.
Under Default package location, enter the PowerShell 7 installer file share location.
\\LOCALDOMAINNAME\SYSVOL\LOCALDOMAINNAME\software
Select Apply and then OK to save and close the properties window.
Right-click the Software installation tab and select New and then Package.
Select the PowerShell 7 MSI file and press Open.
Note: The Explorer window should automatically open at the location where the PowerShell 7 install files are located if you completed step 9 correctly.
Select Assigned for the deployment method and then press OK to finish the wizard.
You can now close the GPO Editor.
The GPO has now been setup and is ready to be linked to organisational units. Any organisational units that have this GPO linked to it will get PowerShell 7 automatically installed when the system next reboots.
If you want to limit which systems get PowerShell 7 installed and control the deployment based on Active Directory Security Group membership, you can setup Group Policy Security Filtering to limit the scope of the group policy object.