|
Replies:
14
-
Pages:
1
-
Last Post:
Dec 2, 2009 11:53 PM
by: Shay Levy
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
New-QADObject computer created as disabled
Posted:
Nov 18, 2009 9:22 AM
|
|
|
I'm sure it's been asked before and answered before but my Google-fu seems weak.
When I create a new computer using:
new-qadobject newpc -parentcontainer "ou=blah,cn=domain,cn=com" -type computer
The computer account is created but is disabled. Is there a way of enabling it that I'm just not seeing? When I use AD Users and Computers to create a computer the account is not disabled so why is there a difference?
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Nov 18, 2009 11:09 AM
in response to: bprentice_437
|
|
|
I've now noticed that even though it appears that the computer object is created when a new machine is brought up and added to the domain with that name a SECOND machine account is created in the default Computers container versus using the computer object I just created.
Am I missing something vital?
|
|
|
Posts:
1,346
Registered:
1/31/08
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Nov 22, 2009 5:31 AM
in response to: bprentice_437
|
 |
Answered |
|
|
Have you tried the new version (1.3) of AD cmdlets? There's a new cmdlet, New-QADComputer, you can use to create computer objects. I have tried it and the new object is not disabled (I didn't test in previous version).
|
Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Nov 23, 2009 7:55 AM
in response to: bprentice_437
|
|
|
That did it.
I see that was just released Thursday so I don't feel too bad about having been using 1.22
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Nov 25, 2009 8:29 AM
in response to: bprentice_437
|
|
|
I take it back - it sort-of worked.
When I create the computer object via new-qadcomputer and then later (1 day to be exact) try to join a machine using that name the new-qadcomputer created account is NOT used and instead another computer account object is created in the default COMPUTERS container versus the one where I created the new-qadcomputer account.
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Nov 25, 2009 8:29 AM
in response to: bprentice_437
|
|
|
Sorry - not quite fixed....
|
|
|
Posts:
1,346
Registered:
1/31/08
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Nov 25, 2009 10:12 AM
in response to: Shay Levy
|
|
|
Sure :
new-qadcomputer -name workstat17 -parentcontainer "ou=xp,dc=domain,dc=com"
Should I have included additional options? I noticed on the object created with the new-qadcomputer cmdlet the pre-windows2000 attribute was set for what appeared to be random characters.
Message was edited by: bprentice_437
|
|
|
Posts:
1,346
Registered:
1/31/08
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Nov 30, 2009 7:03 AM
in response to: Shay Levy
|
|
|
Tried that this morning:
PS > New-QADComputer workstat18 -SamAccountName workstat18 -ParentContainer "ou=xp,dc=domain,dc=com"
<Wait 1 hour or so as image is put on new machine, get out of meeting, reboot machine, go through sysprep mini-setup>
PS > Get-QADCoputer workstat18
Name Type DN ---- ---- -- workstat18 computer CN=workstat18,CN=Computers,DC=domain,DC=com workstat18 computer CN=workstat18,OU=xp,DC=domain,DC=com
Message was edited by: bprentice_437
|
|
|
Posts:
1,346
Registered:
1/31/08
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Dec 1, 2009 7:11 AM
in response to: Shay Levy
|
|
|
SamAccountName -------------- workstat18
I just did the same command against another machine that is working fine - notice the result has a $ at the end of the SamAccountName. So should the command actually be:
new-qadcomputer -name <computer> -samaccountname <computer$> -parentcontainer <my target ou here>
?
|
|
|
Posts:
1,346
Registered:
1/31/08
|
|
|
Posts:
9
Registered:
11/18/09
|
|
|
|
Re: New-QADObject computer created as disabled
Posted:
Dec 2, 2009 12:14 PM
in response to: Shay Levy
|
|
|
Adding the $ to the end of the samaccountname seems to have set things straight.
It does look like a bug - I would have expected the functionality to be automatically name$ unless the samaccountname option was specified. Instead it appears one needs to specify both name and samaccountname (and even then having to put the dollar sign onto the end of the samaccountname)
|
|
|
Posts:
1,346
Registered:
1/31/08
|
|
|
|
Legend
|
|
MVP: 2501
+
pts
|
|
Guru: 2001
- 2500
pts
|
|
Expert: 751
- 2000
pts
|
|
Enthusiast: 31
- 750
pts
|
|
Novice: 0
- 30
pts
|
|
Moderators
|
|
Helpful answer
(5 pts)
|
|
Answered
(10 pts)
|
|