Andys scripting corner - Show proxy / Set transport mode

PowerShell script exchange

Andys scripting corner - Show proxy / Set transport mode

Veeam Logoby Andreas Neufert » Thu Apr 19, 2012 7:48 am 1 person likes this post

Show all proxy options.
Example: Set Transport Mode.

Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
$proxyname = "proxy5-1"
$TransportMode = "Nbd" # Auto/San/HotAdd/Nbd  (Nbd = Network)
$proxyobject = Get-VBRViProxy -Name $proxyname

#Show all Options
write-host "(Main)"
$proxyobject
write-host "Info"
$proxyobject.info
write-host "Host"
$proxyobject.host
write-host "Host.ProxyServicesCreds"
$proxyobject.host.ProxyServicesCreds
write-host "Options"
$proxyobject.Options


#Example Set TransportMode to Network Mode
$ProxyObject.Options.TransportMode = $TransportMode
$ProxyObject.SaveOptions()

 


Example Output:
Code: Select all
PS C:\Dokumente und Einstellungen\Administrator> E:\scripts\proxy.ps1
(Main)


Id          : 331f4fdd-6a93-4923-9a0d-519015579937
Name        : proxy5-1
Description : Created by BACKUP\Administrator at 04.02.2012 14:03:16.
Info        : Veeam.Backup.Model.CBackupProxyInfo
HostId      : 26246646-aa2f-4ef4-9762-727cfcdd070e
Host        : Veeam.Backup.Core.CHost
Type        : Vi
IsDisabled  : False
Options     : Veeam.Backup.Core.CDomViProxyOptions
ChassisType : ViVirtual

Info
Id          : 331f4fdd-6a93-4923-9a0d-519015579937
Name        : proxy5-1
Description : Created by BACKUP\Administrator at 04.02.2012 14:03:16.
IsDisabled  : False
Type        : Vi
HostId      : 26246646-aa2f-4ef4-9762-727cfcdd070e
Options     : <ViProxyOptions><TransportMode>Nbd</TransportMode><FailoverToNetwork>True</FailoverToNetwork><UseSsl>False</UseSsl><IsAutoDetectDisks>True</IsAutoDetectDisks><MaxTasksCount>10</MaxTasksCount></ViProxyO
              ptions>

Host
Info               : proxy5-1
Id                 : 26246646-aa2f-4ef4-9762-727cfcdd070e
Name               : proxy5-1
RealName           : proxy5-1
Reference          :
Description        : Created by BACKUP\Administrator at 04.02.2012 14:03:18.
Type               : Windows
ApiVersion         : Unknown
PhysHostId         : 233b5ee3-8bd9-4b07-95da-159f391987d6
ProxyServicesCreds : Veeam.Backup.Common.CCredentials

Host.ProxyServicesCreds
IsLocalProtect    : True
CurrentUser       : False
UserName          : proxy5-1\Administrator
UserNameOnly      : Administrator
DomainName        : proxy5-1
EncryptedPassword : AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAjo98AExhHEW9LNa9dcP0TAQAAAACAAAAAAADZgAAqAAAABAAAACgqLRxCn5o8hjx/HybtyqLAAAAAASAAACgAAAAEAAAAGFYxCTqS76VTV/R08pUpA8IAAAAHoBacZAWqnwUAAAAoHBCxLR36wuzVeRGXmvLrZYGw7A
                    =

Options
TransportMode     : Nbd
FailoverToNetwork : True
UseSsl            : False
IsAutoVddkMode    : True
IsAutoDetectDisks : True
MaxTasksCount     : 10



CU Andy
Andreas Neufert
Veeam Software
 
Posts: 2201
Liked: 360 times
Joined: Wed May 04, 2011 8:36 am
Location: Germany
Full Name: @AndyandtheVMs Veeam PM

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests