Hello,
Can someone tell me what I'm missing here...
I'm working on a script to move disable computer object to the disable computer OU.
Here's one of my scripts:
Import-Module ActiveDirectory
$computer = get-adcomputer | where {$_.lastlogondate -lt ((get-date).adddays(-90))}
Move-ADObject $Computer.ObjectGUID -TargetPath "OU=DisabledComputers,DC=domain,DC=com"
another:
Import-Module ActiveDirectory
Get-ADComputer ComputerDisabled ComputersOnly | ?{ $_.DistinguishedName -match 'OU=Computers,'} | Move-ADObject TargetPath OU=Disabled Computers,DC=axiallcorp,DC=com
Thank you