Add files via upload

Added a check for the `UacPoll` type so that the cmdlet will run properly on a second and later invocation
chunking
jmhickman 2018-12-19 21:26:00 -06:00 committed by GitHub
parent a910bd5ee4
commit 107d1d7594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -136,8 +136,9 @@ public static class UacPoll
}
}
"@
Add-type -typedefinition $assembly -Language CSharp
if (-not [bool]([appdomain]::CurrentDomain.GetAssemblies() | ? { $_.gettypes() -match 'UacPoll' })) {
Add-type -typedefinition $assembly -Language CSharp
}
[UacPoll]::IsProcessElevated()
}