Get-ADObject giving errors


i have little bit of knowledge in using powershell have long way go.  i trying use get-adobject command having problems. 

using command(also possible parameters can think off):

get-adobject -identity $user -server $domain -credential $mycred

i error saying: get-adobject : cannot find object identity: 'user' under: 'domain'

now if use: get-aduser -identity $user -server $domain -credential $mycred

it goes through fine no problems , bring result back.

any suggestions???

hi,

what's in $user?

edit: i'll assume it's samaccountname, can't use identity parameter of get-adobject. need dn or guid:

http://technet.microsoft.com/en-us/library/ee617198.aspx


don't retire technet! - (don't give yet - 12,575+ strong , growing)




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client