1

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?

5
  • Are these trusted domains and does the Domain-A account which you run it from have access to Domain-B? Commented Mar 15, 2021 at 12:19
  • Yes my computer name is connected in Domain-A and the account which we are using from Domain-B. Commented Mar 15, 2021 at 13:05
  • 1
    Is there a domain trust setup between domain A and B? Is each domain on separate networks/subnets? Commented Mar 15, 2021 at 13:19
  • this does not seem to have anything to do with powershell. if not, please REMOVE the powershell tag.
    – Lee_Dailey
    Commented Mar 15, 2021 at 13:36
  • Yes domain trust setup is there between domain-A and Domain-B. Also both the domain in same network. Commented Mar 15, 2021 at 14:56

1 Answer 1

0

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,PasswordExpired

Then 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')}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .