This Powershell script allows you to download LGPO.exe from the MSFT website and upload it as a Managed App to a specified WS1 Organization Group.
Must download supporting file Deploy-LGPO.ps1 and save it in the same location that Download-LGPO.ps1 will be run from.
Must have access to an AirWatch Admin Account that can authenticate to the APIs with Basic auth (Certificates currently not supported)
Must have the integer value of Organization Group ID, and API Tenant key for that OG
Full API automation support only available on AirWatch 184.108.40.206 and newer
When run, this script will download LGPO.exe into a local folder (C:\Temp\Downloads), repackage LGPO.exe and Deploy-LGPO.ps1 into LGPO-package.zip, and then upload LGPO-package.zip to the WS1 UEM console. It will also offer a reminder to admins to login to the UEM console and assign the application to relevant smart groups.
You will need to supply your AirWatch Admin credentials, including the AirWatch API Key, when prompted.
The task to upload LGPO-package.zip to the AirWatch Console will fail versions of AirWatch prior to 220.127.116.11. See the EXAMPLE section for a full walkthrough of both processes.
The username of an AirWatch account being used in the target AirWatch server. This user must have a role that allows API access.
The password of the AirWatch account specified by the awUsername parameter.
This is the REST API key that is generated in the AirWatch Console. You locate this key at All Settings -> Advanced -> API -> REST, and you will find the key in the API Key field. If it is not there you may need override the settings and Enable API Access, which is available at Customer type Organization Groups
The groupID is the integer value ID of the Organization Group where the app will be uploaded. The API key and admin credentials need to be authenticated at this Organization Group.
The shorcut to getting this value is to navigate to https://<YOUR-AW-HOST>/AirWatch/#/AirWatch/OrganizationGroup/Details. The ID you are redirected to appears in the URL (7 in the following example). https://<YOUR-AW-HOST>/AirWatch/#/AirWatch/OrganizationGroup/Details/Index/7
When the script runs on your machine, logs will be generated under C:\Temp\Logs<ComputerName>-downloadLGPO.log.