ToolBox Guide to
Deploying a PowerShell script with AirWatch is extremely simple. In this blog I'll detail how to do it with the "Product Provisioning" component of AirWatch, but this can be done via "Software Distribution" (aka Apps and Books) as well.
First, navigate to Devices--> Staging & Provisioning --> Components --> Files/Actions.
Then click the "Add Files/Actions" button at the top.
Select "Windows", then "Windows Desktop".
Fill out the Name and Description. Verify you have the correct Organization Group (OG) in the "Managed by" field.
In my example, I have a script to disable UAC.
Click the "Files" tab and the top and then "Add Files".
Browse for your PowerShell script.
If you use lgpo.exe to deploy a local group policy "pack" to your client machines, you've definitely run into the need to make changes later. You can certainly makes changes to your reference machine, take a new backup, and re-deploy the whole thing to your client machines but that means you are re-deploying every setting you have configured. This makes it a little more impactful to the client due to the number of changes you are re-configuring as well as the fact that older versions of Windows 10 are not compatible with lgpo backups made on newer versions. Here is a way to simply change one or two changes to your client machines without having to re-deploy the entire LGPO pack.
1. Ensure you have downloaded lgpo.exe from MS's website here
2. Copy to a folder. I'll use C:\Temp
3. Open cmd prompt as administrator and change directory to c:\Temp
4 Make any changes to local group policy via gpedit.msc
5. Take a backup by running this command:
lgpo.exe /b C:\Temp /n "Backup"
6. This exports the LGPO into a folder with a GUID. I would recommend re-naming to something easier. Example, "LGPO_Backup"
7. Now you are going to want to parse this backup into a text file.
LGPO.exe /parse /m C:\Temp\LGPO_Backup\DomainSysvol\GPO\Machine\registry.pol >> C:\Temp\lgpo.txt
I'm Brooks Peppin and I love God, my family, AirWatch, VMware, EUC products, all things systems management, Windows 10, Powershell, and operating system deployment.