PoshCode Archive  Hex Artifact Content

Artifact 04defe83bb2415e04e301b9df9563fcfeedd987e71235fc05059ef048746cb18:

  • File is-local-admin.ps1 — part of check-in [d6916d0c8c] at 2018-06-10 13:52:55 on branch trunk — I could not find a solution that checks if a user is in local admin groups that can handle a situation if the user is there indirectly, that is a member of a group that is a part of the admin group. The below is what I came up with. The $env:USERDOMAIN part is iffy, since it depends on the account the script is run under, but that was enough for my purposes. Also it seems to detect the membership correctly even for local users and for users that are not local and not in the $env:USERDOMAIN domain, which is good (user: zespri size: 1325)

A hex dump of this file is not available. Please download the raw binary file and generate a hex dump yourself.