我相对肯定这很容易,但我的谷歌没有强大的运行
我正在做的那一刻:
add-pssnapin windows.serverbackup
get-wbsummary
这让我回报:
NextBackupTime : 07/09/2012 12:00:00
NumberOfVersions : 210
LastSuccessfulBackupTime : 06/09/2012 21:00:13
LastSuccessfulBackupTargetPath : \\?\Volume{bf315689-e5ed-11e1-a376-d067e5f384ea}
LastSuccessfulBackupTargetLabel : SBSERVE 2012_08_21 12:20 DISK_01
LastBackupTime : 06/09/2012 21:00:13
LastBackupTarget : SBSERVE 2012_08_21 12:20 DISK_01
DetailedMessage :
LastBackupResultHR : 0
LastBackupResultDetailedHR : 0
CurrentOperationStatus : NoOperationInProgress
我想要做的只是得到结果部分(不是它的标题变成一个变量)所以例如$ lastbackuptime = 07/09/2012 12:00:00
答案 0 :(得分:2)
PS> $wbs = Get-WBSummary
PS> $lastbackuptime = $wbs.NextBackupTime