Currently i am in Domain-A and i am trying to get user id details from another domain(domain-B) with below command.
net user user-id /domain
The request will be processed at a domain controller for domain domain-A.net.
The user name could not be found.
More help is available by typing NET HELPMSG 2221.Since it is failing and trying to find in domain-A itself, So have tried with net user domain-B\user-id /domain however no success, Is there way to get user details from another domain?
1 Answer
I was interested in particular user's domain account password expiry date, through this Link able to get details.
Power shell Command:-
Get-ADUser –Server abc.com username -properties PasswordLastSet, PasswordNeverExpires, PasswordExpired |ft Name, PasswordLastSet, PasswordNeverExpires,PasswordExpiredThen need to calculate expiry date with below command:-
Get-ADUser 'username' -server 'abc.com' -Properties msds-UserPasswordExpiryTimeComputed | Select Name, @{n='PasswordExpires'; e={[datetime]::FromFileTime($_.'msds-UserPasswordExpiryTimeComputed')}}