Quantcast
Channel: Configuration Manager 2007 Operating System Deployment forum
Viewing all articles
Browse latest Browse all 1063

Moving computer from OUs during Task Sequence with Powershell

$
0
0

Hi!

Here's a quick rundown of my problem. We have a Task Sequence that reimages our computer to the current Windows 7 environment. Since we recently merged with another computer, we were basically running in 2 OUs. Now that we are a single entity, we have a new OU to which we move our machines when reimaged.

This move is done via Powershell cmdlet in our Task Sequence.

Here is the command line we use:

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -command "&{Import-Module ActiveDirectory;Get-Content env:computername | Get-ADComputer | Move-ADObject -TargetPath \"OU=Workstations,OU=CORP,DC=OU,DC=XYZ,DC=com\"}"

This step is launched using a Service Account which has the rights to add computers to the domain and move them accordingly.

The problem is, once every 10 machines or so, this step fails to run correctly giving me an "Access Denied" message in smsts.log:

Failed to run the action: Move computer to new OU.
Logon failure: unknown user name or bad password. (Error: 8007052E; Source: Windows) TSManager 9/5/2012 11:09:37 PM 880 (0x0370)

Thinking that maybe it would be a rights problem, I tried replacing the service account with my own, for test purposes, which is Domain Administrator, and I get the same exact problem, so clearly, the problem isn't permission related.

What do you guys think I could be missing?

I tried looking through the security logs of my 2 DCs, there is just SO much information in there and I can't seem to filter for a specific user (i.e.: my service account).

What could I try that I haven't tried yet or maybe that I haven't done correctly?

Thanks!

SteFau


Viewing all articles
Browse latest Browse all 1063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>