-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Welcome to psDeploy, a deployment automation library for Powershell. This small-footprint package provides additional cmdlets for common interaction with Windows during deployment processes.
Adding the psDeploy module to your development / test / production servers allows you to automate the teardown or setup of your environments, thus limiting the need for manual configuration and documentation.
The cmdlets are grouped into 2 categories:
- Download the ZIP file using the link at the top right
- Extract it to any of the powershell module paths, which you can list by running “env:psmodulepath”
- Add the following lines at the top of your script:
Import-Module psDeploy
Assert-PsDeploySupported
The commandlets will usually have one of the following outcome:
- Be successful and print a success message, for ex.
Created new user 'Bill'
- Print a message if no action was taken, for ex.
The app pool 'MyWeb' was already stopped
- Throw an exception detailing the reason of the failure
Is is recommended to log the output of the deployments scripts for inspection or archive purposes.
This can easily be done by wrapping the whole script between:
$date = Get-Date -Format "yyyy-MM-dd-hh\hmm\mss\s"
Start-Transcript -Path "C:\DeploymentLogs\$date.log"
# Insert your script here
Stop-Transcript