mercredi 31 décembre 2014

How can I make a macro to run a few PowerShell commands one after the other?

I am using Amazon Web Service Powershell extension. I have multiple commands I want to run after each other like this:



PS C:\g> Write-S3Object -BucketName "user-staging" -Key "index.html" -File "index.html"
PS C:\g> Write-S3Object -BucketName 'user-staging' -KeyPrefix 'lib/pagedown' -Folder 'lib/pagedown' -SearchPattern '*.js'


How can I combine these into a macro, batch file or something similar so I can run them all just with one simple command such as:



PS C:\g> publish-files




Aucun commentaire:

Enregistrer un commentaire