![]() |
Get-DtPhysicalItem |
This cmdlet returns file system information for the specified server. A physical item can be used to specify a specific file, folder, or volume to return file system information for. For this cmdlet, the -ServiceHost could be your source or target server.
Get-DtPhysicalItem [-Ref] <PhysicalItem> [-ServiceHost] <Server> [<CommonParameters>]
Required? |
false |
Position? |
named |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
Required? |
true |
Position? |
1 |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters. |
A server object is created for the server alpha using the domain\administrator and password credentials. It assigns the server object to the variable called DtServerObjectAlpha. Then the volumes on the server are stored in the variable DtVolumes. Finally, the files and folders at the root of the first volume in DtVolumes is stored in the variable DtVolume1Root. The connections for the server object are then closed.
$DtServerObjectAlpha= New-DtServer -Name alpha -UserName domain\administrator -Password password
$DtVolumes = Get-DtPhysicalItem -ServiceHost $DtServerObjectAlpha
$DtVolume1Root = Get-DtPhysicalItem -ServiceHost $DtServerObjectAlpha -Ref $DtVolumes[0]
Disconnect-DtServer -ServiceHost $DtServerObjectAlpha