![]() |
Add-DtUvraPhysicalRule |
This cmdlet adds a physical rule to the specified full server to ESX appliance workload on the specified server. For this cmdlet, the -ServiceHost should be your source server, and it should be the object returned from New-DtUvraServer, not New-DtServer.
Add-DtUvraPhysicalRule [-Path] <String> [-Recurse] <SwitchParameter> [-Exclude] <SwitchParameter> [-Workload] <Workload> [-ServiceHost] <Server> [<CommonParameters>]
Add-DtUvraPhysicalRule [-Rule] <PhysicalRule> [-Workload] <Workload> [-ServiceHost] <Server> [<CommonParameters>]
Required? |
true |
Position? |
2 |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Required? |
true |
Position? |
named |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Required? |
false |
Position? |
named |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Required? |
false |
Position? |
named |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Required? |
true |
Position? |
3 |
Accept Pipeline Input? |
false |
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. |
Three server objects are created for the source, the appliance, and the ESX server hosting the appliance, assigning the server objects to the DtServerObjectAlpha, DtApplianceObject, and DtApplianceHost variables, respectively. Then proxy and host information is retrieved for those server objects, storing the information in DtProxyInfo and DtVmHostInfo, respectively. That information is then used to retrieve the recommended job options. A rule for the path C:\Documents and Settings is added to the recommended job options. The connections for the server object are then closed.
$DtServerObjectAlpha= New-DtUvraServer -Name alpha -UserName domain\administrator -Password password -Port 6325
$DtApplianceObject = New-DtUvraServer -Name beta -UserName root -Password password -Port 6325
$DtApplianceHost = New-DtUvraServer -Name gamma -UserName root -Password password
$DtWorkloadGuid = New-DtWorkload -ServiceHost $DtServerObjectAlpha -WorkloadTypeName Lvra
$DtWorkload = Get-DtWorkload -ServiceHost $DtServerObjectAlpha -WorkloadId $DtWorkloadGuid
$DtRecommendedJobOptions = Get-DtRecommendedJobOptions -ServiceHost $DtApplianceObject -Source $DtServerObjectAlpha -JobType Lvra -Workload $DtWorkload
Add-DtUvraPhysicalRule -ServiceHost $DtApplianceObject -Workload
$DtRecommendedJobOptions.JobOptions.Workload -Path "/home"
Disconnect-DtServer -ServiceHost $DtServerObjectAlpha
Disconnect-DtServer -ServiceHost $DtApplianceObject
Disconnect-DtServer -ServiceHost $DtApplianceHost