0

我相对确定这很容易做到,但我的 google fu 运行不强

目前我正在做:

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

4

1 回答 1

2
PS> $wbs = Get-WBSummary   
PS> $lastbackuptime = $wbs.NextBackupTime
于 2012-09-07T11:20:07.230 回答