Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $url = 'https://commandcenter.blob.core.windows.net/dos/CommandCenter.latest.zip?sv=2018-03-28&si=dos-1661D6B74D7&sr=b&sig=%2B7CMpQyjCkuNnTAPZHLw%2FgRoZ8oR%2BUKFrZxlTbpHXNo%3D'
  2. $filename = 'CommandCenter.latest.zip'
  3. $folder = $filename.replace('.zip','')
  4. $path = 'c:\install'
  5. if(!(Test-Path -Path $path)){
  6. mkdir -Path $path
  7. }
  8.  
  9. Push-Location $path
  10. Remove-Item ".\$folder" -Recurse -ErrorAction Ignore
  11. Remove-Item ".\$filename" -ErrorAction Ignore
  12. Invoke-WebRequest -Uri $url -outfile ".\$filename"
  13. Expand-Archive -Path ".\$filename" -DestinationPath ".\$folder"
  14. Import-Module ".\$folder\CommandCenter.psm1" -Force
  15. Push-Location "$path\CommandCenter.latest\menus"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement