You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason the Test-RunningAsSystem is returning false even though the start-transcript header shows the user as DOMAIN\SYSTEM
I am making the following suggestion for changing the fuction:
Original function:
#check if running as system
function Test-RunningAsSystem {
[CmdletBinding()]
param()
process {
return [bool]($(whoami -user) -match "S-1-5-18")
}
}
Suggested function (which is working properly in my testing):
#check if running as system
function Test-RunningAsSystem {
[CmdletBinding()]
param()
process {
return [bool]([System.Security.Principal.WindowsIdentity]::GetCurrent().IsSystem)
}
}
The text was updated successfully, but these errors were encountered:
For some reason the Test-RunningAsSystem is returning false even though the start-transcript header shows the user as DOMAIN\SYSTEM
I am making the following suggestion for changing the fuction:
Suggested function (which is working properly in my testing):
The text was updated successfully, but these errors were encountered: