Quantcast
Channel: Configuration Manager 2012 - Operating System Deployment forum
Viewing all articles
Browse latest Browse all 9126

MoveComputerObject in task sequence via task sequence (PowerShell)

$
0
0

Hi,

I'd like to move an computer object in a task sequence via PowerShell.
I have a PowerShell Script to do this:

$target = Get-ADOrganizationalUnit -LDAPFilter "(name=TargetOU)"
get-adcomputer mycomputer| Move-ADObject -TargetPath $target.DistinguishedName

Please advise howto integrate this in SCCM 2012 R2 task sequence (and where).
I'm not sure if the object is already there it will throw an error ...?

Please advise.

J.


Jan Hoedt

Update: there is this thread but where would you implement the step (and any special settings for enabling powershell (set-executionpoliy)?

http://social.technet.microsoft.com/Forums/systemcenter/en-US/c42606b3-a3e2-4524-a325-407c0551f8b1/moving-computer-from-ous-during-task-sequence-with-powershell?forum=configmgrosd



Viewing all articles
Browse latest Browse all 9126

Trending Articles