Skip to content

Instantly share code, notes, and snippets.

@JamesDawson
Created July 24, 2013 07:12
Show Gist options
  • Save JamesDawson/6068602 to your computer and use it in GitHub Desktop.
Save JamesDawson/6068602 to your computer and use it in GitHub Desktop.
configuration DscSecurity
{
node LAB-WEB01
{
Script UserInfo
{
GetScript = { return $null }
TestScript = {
Write-Verbose ("ENV username: '{0}'" -f $env:USERNAME)
Write-Verbose ("Windows Identity: '{0}'" -f [System.Security.Principal.WindowsIdentity]::GetCurrent().Name)
Write-Verbose ("Thread Principal: '{0}'" -f [System.Threading.Thread]::CurrentPrincipal.Identity.Name)
return $false
}
SetScript = { Write-Verbose ("Empty SetScript") }
}
}
}
DscSecurity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment