Sample Exchange

 View Only

Windows 10 - Workspace ONE Hub - PowerShell Profile 

Apr 09, 2020 08:59 PM

This script convert a powershell script into an encoded command and generate a XMLfile.

The content of the XML can then added as a Custom Profile in Workspace ONE UEM to target Workspace ONE Hub

Requirement

PowerShell 3.0

Usage

.\Create-PowerShellProfile.ps1
        -FilePath .\MyScript.ps1
        -Arch 32 or 64
.\Create-PowerShellProfile.ps1
        -FilePath .\MyScript.ps1
        -Arch 32 or 64

Limitations

There is a Windows limitation on the maximum length of a command line which is 32767 characters long. I’ve implemented this check in the script, it will give an error and won’t generate the profile if the command line is longer than this maximum.

Create profile in UEM

In the Windows Desktop section, select either User or Device profile then Custom Settings.

Select Workspace ONE Intelligent Hub as the Target, un-tick “Make Commands Atomic” and paste the XML content in the Install Settings.

The Remove Settings section is mandatory so you can put another XML script which would undo what is done in the Install section.


#AirWatch
#VMwareWorkspaceONEUEM
#workspaceONE
#windows10
#PowerShell
#MIT

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
ps1 file
Create-PowerShellProfile.ps1   2 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Related Entries and Links

No Related Resource entered.