Episode 4 – Get-GPResultantSetOfPolicy
PowerShell Cmdlet of the Day Podcast
English - August 29, 2011 00:00 - 5.76 MB - ★★★★ - 6 ratingsTechnology powershell Homepage Download Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed
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