Download the MP3 Podcast In this episode we look at how you can generate an RSOP with Windows PowerShell by using Get-GPResultantSetOfPolicy by using the GroupPolicy module that comes with the GPMC that is bundled in Windows Server 2008 R2 and the most recent version of RSAT. # Populate dir with the current dir regardless […]

Download the MP3 Podcast


In this episode we look at how you can generate an RSOP with Windows PowerShell by using Get-GPResultantSetOfPolicy by using the GroupPolicy module that comes with the GPMC that is bundled in Windows Server 2008 R2 and the most recent version of RSAT.


# Populate dir with the current dir regardless of whether
# you are in a script or executing in the shell
if ($MyInvocation.MyCommand.Path) {
$dir = $MyInvocation.MyCommand.Path
}
else {
$dir = $pwd
}

$user = 'home\Administrator'
$report = Join-Path $dir 'rsop.html'
$comp = 'Server1'
Get-GPResultantSetOfPolicy -User $user -Path $report -ReportType HTML -Computer $comp


Brought to you by The Windows PowerShell Bible 2.0 and PowerShellGroup.Org