Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

move-ADObject

$
0
0

$PCNAME = Get-Content env:computername 

$MoveOU = "OU=blake,OU=Workstations,DC=acme,DC=org"

Get-ADComputer $PCNAME | Move-ADObject -TargetPath $MoveOU

The above code runs without error yet my machine does not get moved.   $PCNAME does contain my computer name.   How come?
Thank you.  

Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images