function Get-SecurityPolicy { <# .SYNOPSIS Gets the security policy and returns the full content. #> param( ) $logLead = (Get-LogLeadName); $exportFile = [System.IO.Path]::GetTempFileName() Write-Verbose ("$logLead : Exporting local security policy to {0}" -f $exportFile) secedit.exe /export /cfg $($exportFile) | Out-Null return ( Get-Content -Path $exportFile ) }