Skip to content

Instantly share code, notes, and snippets.

@jjhamshaw
Created March 26, 2012 18:03
Show Gist options
  • Save jjhamshaw/2207971 to your computer and use it in GitHub Desktop.
Save jjhamshaw/2207971 to your computer and use it in GitHub Desktop.
powershell pscx module example: 'write-zip'
C:\Windows\System32\WindowsPowerShell\v1.0
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest AppLocker {}
Manifest BitsTransfer {}
Manifest PSDiagnostics {}
Manifest TroubleshootingPack {}
Manifest WebAdministration {}
import-module Pscx
task Deploy {
$artifacts = "C:\src\build\"
$destination = "D:\Applications\Deploy"
$zipFilename = "MySite.zip"
write-zip $artifacts ($destination + $zipFilename)
}
remove-module Pscx
write-host "$PSHome"
write-host "get-module -listAvailable"
import-module Pscx
task Deploy {
$artifacts = "C:\src\build\"
$destination = "D:\Applications\Deploy"
$zipFilename = "MySite.zip"
write-zip $artifacts ($destination + $zipFilename)
}
remove-module Pscx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment