Run PowerShell Scripts through Deployment Server
Created: 18 Apr 2008 | Updated: 07 Jul 2009 | 3 comments
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.
- Create a new job.
- Add a Copy File task
- The source path points to MyScript.ps1 on the Deployment Server.
- The destination path is .\MyScript.ps1
- Add a Run Script task as the following:
powershell -command "& { .\MyScript.ps1; exit $lastexitcode }" set ret=%errorlevel% del .\MyScript.ps1 exit %ret%
Blog Entry Filed Under:

The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments 3 Comments • Jump to latest comment
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
Regards Erik www.DinamiQs.com Dinamiqs is the home of VirtualStorm (www.virtualstorm.org)
*************************************************************
If your issue has been solved, Please mark it as solved
***********
great article
Very Good! Thanks
Would you like to reply?
Login or Register to post your comment.