Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $AV_Username = "DOMAIN\User" ## App Volumes Administrator
- $AV_Password = 'P@ssw0rd' ## App Volumes Administrator password
- $AV_server = "appvolume.domain.local" ## App Volumes Server
- ### Connect to App Volume Server
- write-host -ForegroundColor "yellow" "connect to $AV_server"
- $server = $AV_server
- $body = @{
- username = $AV_Username
- password = $AV_Password
- }
- Invoke-RestMethod -SessionVariable Login -Method Post -Uri "http://$server/cv_api/sessions" -Body $body | Out-Null
- Set-Variable -Name Login -value $login -Scope global
- Set-Variable -Name Server -value $server -Scope global
Advertisement
Add Comment
Please, Sign In to add comment