sync
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
$AllHosts = Get-Datacenter Primary*, Secondary* | Get-Cluster | where-object {$_.Name -notlike "AVAYA*" -and $_.Name -notlike "TEL*"} | Sort-object Name | Get-VMHost
|
||||
$result = @()
|
||||
ForEach ($VMHost in $AllHosts) {
|
||||
$Configured = $null
|
||||
$Current = $null
|
||||
$Configured = ($VMHost | Get-AdvancedSetting ScratchConfig.ConfiguredScratchLocation).Value;
|
||||
$Current = ($VMHost | Get-AdvancedSetting ScratchConfig.CurrentScratchLocation).Value;
|
||||
|
||||
|
||||
$obj = [PSCustomObject]@{
|
||||
Name = $VMHost.Name;
|
||||
FS92 = If ($Configured -eq $Current) { $true }Else { $false };
|
||||
Configured = $Configured
|
||||
Current = $Current
|
||||
}
|
||||
$result += $obj
|
||||
}
|
||||
<#
|
||||
$HostsToReboot = $result | where-object FS92 -eq $False
|
||||
ForEach($VMHost in $HostsToReboot){
|
||||
$VMHost | Set-VMHost -State "Maintenance"
|
||||
#disable alarms
|
||||
#restart host
|
||||
#updateprofile
|
||||
#remediateprofile
|
||||
|
||||
}
|
||||
#>
|
||||
Reference in New Issue
Block a user