clinthuffman / Clue

Triggered Windows performance data collection tool.
MIT License
98 stars 22 forks source link

Updated Test-AdminRights for non english systems #1

Open juangranados opened 5 years ago

juangranados commented 5 years ago

Test-AdminRights did not work on non english systems. Source: Hey Scripting Guy blog. http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/11/check-for-admin-credentials-in-a-powershell-script.aspx Now it works on all Windows Versions.

juangranados commented 5 years ago

Hi Clint! Thank you for your amazing tool. I was installing it on a Windows Server with spanish languaje and Test-AdminRights always returned false because $oOutput variable contains spanish messages. I changed it by Scripting Guy function that works in all languages.

clinthuffman commented 5 years ago

That sounds like a bug. Thanks for letting me know.

Thank you,


From: juangranados notifications@github.com Sent: Monday, July 1, 2019 2:05:37 AM To: clinthuffman/Clue Clue@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [clinthuffman/Clue] Updated Test-AdminRights for non english systems (#1)

Hi Clint! Thank you for your amazing tool. I was installing it on a Windows Server with spanish languaje and Test-AdminRights always returned false because $oOutput variable contains spanish messages. I changed it by Scripting Guy function that works in all languages.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fclinthuffman%2FClue%2Fpull%2F1%3Femail_source%3Dnotifications%26email_token%3DAEXDYVBZESHMSZDYQE52USDP5HCGDA5CNFSM4H4QE5Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY5PTHA%23issuecomment-507181468&data=02%7C01%7C%7C9076d417de8d45ba1ac308d6fe034965%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636975687398960720&sdata=JUKEDywkopNM9%2F4UPmFRFUET8YzODZ6kZgTujOCQ7Cs%3D&reserved=0, or mute the threadhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEXDYVHABCT5L4DY6MIZESDP5HCGDANCNFSM4H4QE5ZQ&data=02%7C01%7C%7C9076d417de8d45ba1ac308d6fe034965%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636975687398970731&sdata=bHWVz5xD5tF4%2FTY3Eb%2B5GjnyjLyjL9ey2eEeqZvyJ6o%3D&reserved=0.

ludovicferra commented 3 years ago

Hi @clinthuffman for elevated detection this work for all systems langages : function Test-AdminRights { ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator') }

Thanks