sync
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
$VMHosts = Get-VMHost
|
||||
#$VMHosts = Get-VMHost itdmdnvm-ps01.nd.gov
|
||||
$Result = [System.Collections.ArrayList]@()
|
||||
|
||||
ForEach($VMHost in $VMHosts)
|
||||
{
|
||||
$Datacenter = $VMHost | Get-Datacenter
|
||||
|
||||
switch ($Datacenter.Name) {
|
||||
'Secondary Datacenter' {$FullPath = '/vmfs/volumes/VMTEMPL2_253_A9K_MISC/VMwareTools'} # 5b71994c-91a540f5-2799-5cb901c7ebb0
|
||||
'Primary Datacenter' {$FullPath = '/vmfs/volumes/VMTEMPL1_252_A9K_MISC/VMwareTools'} # 5b72f9fe-6fe879bb-2c19-6cc217314910
|
||||
'DCN Datacenter' {$FullPath = '/vmfs/volumes/VMDCN1_20_V5K/VMwareTools'} # 5a737d2f-b45bb27d-7f74-e0071befea78
|
||||
'DES Datacenter' {$FullPath = '/vmfs/volumes/VMDES1_10_V3700/VMwareTools'} # 556f4727-d3b6d2cd-3b9c-8cdcd4add10c
|
||||
Default {}
|
||||
}
|
||||
|
||||
$OldToolsSetting = Get-AdvancedSetting -Entity $VMHost -Name UserVars.ProductLockerLocation
|
||||
Write-Warning ("PreviousValue: " + ($OldToolsSetting | select Entity,Name,Value))
|
||||
#$OldToolsSetting | Set-AdvancedSetting -Value $FullPath -Confirm:$false
|
||||
$obj=[PSCustomObject]@{
|
||||
'Entity' = $VMhost.Name;
|
||||
'Value' = $OldToolsSetting.Value;
|
||||
}
|
||||
|
||||
$null = $Result.Add($obj)
|
||||
}
|
||||
|
||||
# host reboot required to take effect
|
||||
Reference in New Issue
Block a user