Hi,
im trying to find VMs with no descrption in the descrption field and then get the descprition from these vms from AD and then set the variable. Something with -eq null not working.
$VMs = Get-SCVirtualMachine | Select-Object Name, ComputerName, Description
foreach ($VM in $VMs)
{
if ($VM.Description -eq $null)
{
Write-Host $VM.ComputerName
Set-SCVirtualMachine -Description | Get-ADComputer -Identity $VM | Select-Object Descrption
}
}