I would like to add an existing local user to the SQL Server as a sysadmin, with PowerShell. fter some research I have the following script so far:
$Username = \
Change
'$Username'
with
"$Username"
Note that in powershell variable aren't expanded in single quote, then '$Username' is take as literal and not for the value of the variable.