Desktop Authority does not have a specific feature to launch PowerShell scripts but PowerShell scripts can be successfully launched using one or more Desktop Authority Objects.
A number of objects from Desktop Authority can be employed to complete the various tasks required from end to end depending upon what is necessary in a particular environment:
The Application Launcher Object may be used to execute a PowerShell script.
The File Operations Object may be used to copy the .ps1 file over to a local folder on the client machine.
The Group Policy Templates Object may be used to enable script execution.
The settings for the various objects are listed below:
1. If using the Application Launcher Object to launch the .ps1 file; the target should be entered as PowerShell.exe and the Arguments should be entered as the full path to the ps1 file (i.e. \\server\Share\Test.ps1). Note: If it is desired not to use Microsoft Group Policy to enable script execution and instead bypass it by using arguments, then the Arguments should be entered this way: -noprofile -executionpolicy bypass -file \\server\Share\Test.ps1
2. If using the File Operations Object to copy the .ps1 file locally; the Operation should be set to Copy. The Source folder should be set to \\server\Share (folder where the source ps1 file is located). The Source file should be entered as the name of the ps1 file (example: Test.ps1). And the destination folder is the target directory on the client machine where the ps1 file is to be copied to (Example: C:\Test\).
3. In order for a PowerShell script to be launched, script execution must first be enabled. Microsoft Group Policy can be used to enable script execution by clicking on Administrative Templates | Windows Components | Windows PowerShell | Turn on Script Execution [Enable]. Or the Desktop Authority Group Policy Templates Object may be used with the same settings as above.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center