hi, i have add to my vCO a powershell host, now i need to launch a command into this host machine (in my case the AD host) i need to make move a computer from original folder CN=Computers,DC=domain,DC=xxx to another organization unit ..
i use this command
Import-Module ActiveDirectory
get-adcomputer computername | Move-ADObject -TargetPath 'OU=Computers,OU=xxxxx,DC=xxxx,DC=xxx'
but i need the "computername" is a dinamic variable because the "computername" change every virtual machine i create..
i user the workflow "Invoke a powershell scripts" but i don't know if is the correct way because i have some error, but if i launch the command directly from PS in the host machine this work...
can anyonw help me to untherstand to use powershell
thanks