●Veeam PS Extensionsで、vCenterを利用することなくVeeam Reporter Enterprise データベースへPowerShellを使用して接続することができます。
詳細のサンプルコード:
Once you have everything installed, simply open the Veeam PowerShell Extensions shortcut and connect to the Veeam DB using the _Connect-VIServer command:
PS C:\Documents and Settings\Administrator\Desktop> _Connect-VIServer
cmdlet _Connect-VIServer at command pipeline position 1
Supply values for the following parameters:
SQLInstance: localhost\veeam
SQLDatabase: VeeamReporter
Now that you are connected, you can do some basic commands like _Get-VM
|
Name
|
PowerState
|
Num CPUs
|
Memory (MB)
|
|
—-
|
———-
|
——–
|
———–
|
|
WindowsServ01
|
PoweredOff
|
1
|
256
|
|
MSVM02
|
PoweredOff
|
1
|
256
|
|
MSVM011
|
PoweredOff
|
1
|
256
|
|
MSVM03_RUN
|
PoweredOff
|
1
|
256
|
|
MSVM04_TEST
|
PoweredOff
|
1
|
256
|
|
WindowsServ02_STA…
|
PoweredOff
|
1
|
256
|
|
MSVM03
|
PoweredOff
|
1
|
256
|
|
WindowsServ02
|
PoweredOff
|
1
|
256
|
|
MSVM04
|
PoweredOff
|
1
|
256
|
|
Windows Server Ho…
|
PoweredOff
|
1
|
256
|
|
DSL Linux
|
PoweredOff
|
1
|
256
|
To check what data set you’re viewing, you can use the _Get-VRCurrentDate command:
PS C:\Documents and Settings\Administrator\Desktop> _Get-VRCurrentDate
Tuesday, March 24, 2009 5:24:15 PM
If you want to connect to a different date, simply use the _Set-VRCurrentDate command and enter a date:
PS C:\Documents and Settings\Administrator\Desktop> _Set-VRCurrentDate
cmdlet _Set-VRCurrentDate at command pipeline position 1
Supply values for the following parameters:
Date: 03.22.2009
To check that you’re connected to the proper date, rung the _Get-VRCurrentDate command again:
PS C:\Documents and Settings\Administrator\Desktop> _Get-VRCurrentDate
Sunday, March 22, 2009 12:00:00 AM
Now, executing the _Get-VM command will show different results, for that particular date:
|
Name
|
PowerState
|
Num CPUs
|
Memory (MB)
|
|
—-
|
———-
|
——–
|
———–
|
|
WindowsServ01
|
PoweredOn
|
1
|
256
|
|
MSVM02
|
PoweredOff
|
1
|
256
|
|
MSVM011
|
PoweredOff
|
1
|
256
|
|
MSVM03_RUN
|
PoweredOff
|
1
|
256
|
|
MSVM04_TEST
|
PoweredOff
|
1
|
256
|
|
WindowsServ02_STA…
|
PoweredOff
|
1
|
256
|
|
MSVM03
|
PoweredOff
|
1
|
256
|
|
WindowsServ02
|
PoweredOff
|
1
|
256
|
|
MSVM04
|
PoweredOff
|
1
|
256
|
|
Windows Server Ho…
|
PoweredOff
|
1
|
256
|
|
DSL Linux
|
PoweredOn
|
1
|
256
|