Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for localized Administrator name in Remediate.ps1 #50

Open
lucafabbri365 opened this issue Sep 12, 2022 · 3 comments · May be fixed by #60
Open

Support for localized Administrator name in Remediate.ps1 #50

lucafabbri365 opened this issue Sep 12, 2022 · 3 comments · May be fixed by #60
Assignees

Comments

@lucafabbri365
Copy link

lucafabbri365 commented Sep 12, 2022

Hello,
it would be useful to have support to localized Administrator name (Administrateur, Administrador, etc.) in Remediate.ps1 when different "base" OS language versions are in use.
So instead of having:

# Define the local administrator user name
$LocalAdministratorName = "<Enter the name of the local administrator account>"

# Construct the required URI for the Azure Function URL
$SetSecretURI = "<Enter Azure Functions URI for SetSecret function>"
$SendClientEventURI = "<Enter Azure Functions URI for SendClientEvent function>"

it could be:

# Define the local administrator user name
$LocalAdministratorName = ""

# Select to use default local administrator
$UseDefaultAdministrator = $true
	  
if ($UseDefaultAdministrator){
	$LocalAdministratorName = (Get-LocalUser | Where-Object {$_.SID -like "*-500"}).Name
	Enable-LocalUser -Name $LocalAdministratorName
}

# Construct the required URI for the Azure Function URL
$SetSecretURI = "<Enter Azure Functions URI for SetSecret function>"
$SendClientEventURI = "<Enter Azure Functions URI for SendClientEvent function>"

What about ?

@NickolajA
Copy link
Member

This sounds like a great idea. Has it been tested on your end?

@NickolajA NickolajA self-assigned this Nov 1, 2022
@SasStu
Copy link

SasStu commented Nov 1, 2022

Hi, I am using this function quite regularly to enumerate local security principals by SID.

Get-LocalPrincipal

@lucafabbri365
Copy link
Author

Hello @NickolajA,
sorry for the late reply.
Yes, I have implemented the proposed changed in production long time ago (more than 3 months ago).

Bye,
Luca

@lucafabbri365 lucafabbri365 linked a pull request Dec 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants