18 lines
403 B
PowerShell
18 lines
403 B
PowerShell
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 )
|
|
}
|