Deployment Solution

 View Only

Run PowerShell Scripts through Deployment Server 

Apr 18, 2008 11:34 AM

PowerShell is the new powerful scripting language created by Microsoft. You can install it to Windows XP and above and it is included in Windows Server 2008.

Here is how to run a PowerShell Script through Deployment Server.


  1. Create a new job.
  2. Add a Copy File task
    • The source path points to MyScript.ps1 on the Deployment Server.
    • The destination path is .\MyScript.ps1
  3. Add a Run Script task as the following:
    powershell -command "& { .\MyScript.ps1; exit $lastexitcode }"
    set ret=%errorlevel%
    del .\MyScript.ps1
    exit %ret%
    
    

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Nov 03, 2011 04:03 PM

Very Good!  Thanks

Apr 02, 2010 06:39 PM


great article

Apr 18, 2008 11:56 AM

Powershell is not standard in Windows 2008 core server. Remember that if you wish to use it you need to install it yourself.
Regards
Erik
www.dvs4sbc.nl

Related Entries and Links

No Related Resource entered.