Local or domain user/group

Welcome Forums General PowerShell Q&A Local or domain user/group

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
2 years, 8 months ago.

  • Author
    Posts
  • #35028

    Participant
    Points: 0
    Rank: Member

    How to find if a user / group is a local or domain user / group in PowerShell
    Thanks

  • #35031

    Participant
    Points: 0
    Rank: Member

    Can you show us a script?

  • #35357

    Participant
    Points: 0
    Rank: Member

    If you are looking for group memberships of a particular user then you can use whoami command on the local machine which you can pipe the results to get the groups list, you can also use invoke-command to execute on remote machines.

    whoami /user

    whoami /groups /fo csv | convertfrom-csv | select -expandproperty "group name"

The topic ‘Local or domain user/group’ is closed to new replies.