Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to run the following powershell command through my application using c#

Get-ADUserResultantPasswordPolicy user1

It returns the values for user1 on domain1 which is my current domain.

when I try to read the values for a user2 on domain2:

Get-ADUserResultantPasswordPolicy domain2\user2

its throwing exception:

Cannot find an object with identity:'user2' under:'DC=domain2,DC=com'.

Is there away to point powershell to the other domains and read the data on that domain?

thanks in advance

What I have tried:

Get-ADUserResultantPasswordPolicy domain2\user2
Posted
Updated 1-Jul-16 1:51am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900