Skip to content

Commit

Permalink
Merge pull request docker#24 from olivbour/patch-1
Browse files Browse the repository at this point in the history
Fix HyperV Administrator check
  • Loading branch information
praveenkumar authored Nov 15, 2019
2 parents b39d5b5 + af52a57 commit e1854df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hyperv/powershell.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func isAdministrator() (bool, error) {
}

func isHypervAdministrator() bool {
stdout, err := cmdOut(`@([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("S-1-5-32-578")`)
stdout, err := cmdOut(`@([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(([System.Security.Principal.SecurityIdentifier]::new("S-1-5-32-578")))`)
if err != nil {
log.Debug(err)
return false
Expand Down

0 comments on commit e1854df

Please sign in to comment.