Local or domain user/group

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Nagendra Narembally Nagendra Narembally 7 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #35028
    Profile photo of Cognic

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

    Profile photo of Wilfredo Perez
    Wilfredo Perez

    Can you show us a script?


    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"

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.