daily pastebin goal
53%
SHARE
TWEET

UAG Activate Config

a guest Apr 6th, 2013 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ErrorActionPreference = "Stop"
  2.  
  3. $SecureString = ConvertTo-SecureString -String "\`d.T.~Vb/{41BAA34C-B0E6-41D0-8F2B-CB3901AAF6A8}\`d.T.~Vb/" -AsPlainText -Force
  4. $Creds = New-Object system.Management.Automation.PSCredential("domain\os2uag_connector", $SecureString)
  5. $SessionOpt = New-PSSessionOption -OperationTimeout (30*60*1000)
  6. $Session = New-PSSession -ComputerName "server-uag01" -Credential $Creds -SessionOption $SessionOpt
  7.  
  8. Invoke-Command -Session $Session -ScriptBlock {Import-Module "c:\Scripts\UAGFunctions.ps1"}
  9. Invoke-Command -Session $Session -ScriptBlock {Set-UAGConfig -BackupDir "c:\EGFBackups" -UAGActivatorPath "c:\Scripts\UAGActivate.exe" }
  10.  
  11. Invoke-Command -Session $Session -ScriptBlock { Activate-UAGConfig }
  12.  
  13. $Session | Remove-PSSession
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top