Skip to content

Commit

Permalink
Fix concatenation and trimming of CheckAdminUserName
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenAelterman committed Dec 19, 2024
1 parent 266c2b1 commit 41f98bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workload/scripts/Manual-DSC-Storage-Scripts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ if ($IdentityServiceProvider -ne 'EntraID') {
[string]$CheckAdminUserName = $AdminUserName
If ($CheckAdminUserName -match '^(?<user>.+)@.+$') {
# Convert the username to check in NTLM format
$CheckAdminUserName = "$((Get-WmiObject Win32_NTDomain).DomainName)\\$($Matches['user'])"
$CheckAdminUserName = "$((Get-WmiObject Win32_NTDomain).DomainName)\$($Matches['user'])".Trim()
}

# Check if the domain join account is already in the local Administrators group
Expand Down

0 comments on commit 41f98bb

Please sign in to comment.