
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2015 05:01 PM
How to run PowerShell script via Deployment Packages?
Solved! Go to Solution.
Labels:
- Labels:
-
General Discussion
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 04:56 PM
We have issues with just running this way due to the execution policy (for security reasons we do not change the default).
A better way to avoid having this issue is to run PowerShell commands and scripts this way in a command step:
PowerShell Commands
PowerShell Scripts
This will guarantee that PowerShell commands and scripts run as intended.
A better way to avoid having this issue is to run PowerShell commands and scripts this way in a command step:
PowerShell Commands
powershell.exe -executionpolicy bypass -command {"commands go here"}
PowerShell Scripts
powershell.exe -executionpolicy bypass -file "{PackageShare}\Scripts\script.ps1"
This will guarantee that PowerShell commands and scripts run as intended.
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 04:56 PM
We have issues with just running this way due to the execution policy (for security reasons we do not change the default).
A better way to avoid having this issue is to run PowerShell commands and scripts this way in a command step:
PowerShell Commands
PowerShell Scripts
This will guarantee that PowerShell commands and scripts run as intended.
A better way to avoid having this issue is to run PowerShell commands and scripts this way in a command step:
PowerShell Commands
powershell.exe -executionpolicy bypass -command {"commands go here"}
PowerShell Scripts
powershell.exe -executionpolicy bypass -file "{PackageShare}\Scripts\script.ps1"
This will guarantee that PowerShell commands and scripts run as intended.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2015 12:08 PM
In a command step you can use the command
Open a cmd on your computer and type
in order to see details about which parameters are available.
powershell "[powershell command]"
Open a cmd on your computer and type
powershell -help
in order to see details about which parameters are available.
