Compare-VBRWindowsGuestItemsAttributes
Short Description
Compares attributes of files and folders from a backup with attributes of original files and folders.
Product Edition: Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Compare-VBRWindowsGuestItemsAttributes -FileRestore <FileRestore> -Item <VBRFLRFsItem> [<CommonParameters>] |
Detailed Description
This cmdlet compares attributes of files and folders from a backup with attributes of original files and folders.
When Veeam Backup & Replication compares files, it compares their attributes. When Veeam Backup & Replication compares folders, it compares folder attributes and file attributes inside the folder recursively. Once a file with changed attributes is found, Veeam Backup & Replication stops comparing files and marks the folder as changed. If you further browse the folder in the compared state, Veeam Backup & Replication continues comparing non-compared files and folders. Veeam Backup & Replication compares the following attributes: Date Created, Date Modified, Size (only for files), Read-Only, Hidden, Archive, NTFS Encryption.
Note |
|
Before comparing attributes, you must establish connection with the original machine using the |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
FileRestore |
Specifies a restore session of Microsoft Windows guest OS files. The cmdlet will use this session to restore guest OS files. Note: The restore session must be started within the current PowerShell session.
Accepts the |
|
True |
Named |
False |
|
Item |
An array of files and folders whose attributes you want to compare.
Accepts the |
|
True |
Named |
True (ByPropertyName, ByValue) |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
This cmdlet returns the VBRWindowsGuestItemAttributesView object that contains attributes of the compared files or folders.
Examples
Comparing Attributes of Files and Folders from Backup with Attributes of Original Files and Folders
This example shows how to compare attributes of files and folders.
|
$backup = Get-VBRBackup -Name "WinSrv25" $restorepoint = Get-VBRRestorePoint -Backup $backup -Name "Production VM" $session = Start-VBRWindowsFileRestore -RestorePoint $restorepoint[1] Connect-VBRWindowsGuestProductionMachine -FileRestore $session $file = Get-VBRWindowsGuestItem -FileRestore $session -Path "C:\Documents\Training\SummerTraining2020.pdf" Compare-VBRWindowsGuestItemsAttributes -FileRestore $session -Item $file |
Perform the following steps:
- Run the
Get-VBRBackupReturns backups. cmdlet. Specify theNameparameter value. Save the result to the$backupvariable. - Run the
Get-VBRRestorePointReturns restore points. cmdlet. Set the$backupvariable as theBackupparameter value. Specify theNameparameter value. Save the result to the$restorepointvariable.The
Get-VBRRestorePointcmdlet will return an array of restore points. Mind the ordinal number of the necessary restore point (in our example, it is the second restore session in the array). - Run the
Start-VBRWindowsFileRestoreStarts Windows VM guest OS file restore session. cmdlet. Set the$restorepointvariable as theRestorePointparameter value. Save the result to the$sessionvariable. - Run the
Connect-VBRWindowsGuestProductionMachineConnects to the machine where original files and folders reside. cmdlet. Set the$sessionvariable as theFileRestoreparameter value. - Run the
Get-VBRWindowsGuestItemReturns Microsoft Windows guest OS files. cmdlet. Set the$sessionvariable as theFileRestoreparameter value. Specify thePathparameter. Save the result to the$filevariable. - Run the
Compare-VBRWindowsGuestItemsAttributescmdlet. Set the$sessionvariable as theFileRestoreparameter value. Set the$filevariable as theItemparameter value.
Related Commands
Start-VBRWindowsFileRestoreStarts Windows VM guest OS file restore session.Get-VBRWindowsGuestItemReturns Microsoft Windows guest OS files.