Episode 4 – Get-GPResultantSetOfPolicy

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

Advertisements

About Tome

Tome is a Windows engineer for a market-leading global financial services firm in New York City. He is the founder and leader of the New York City PowerShell User group, a blogger, a regular contributor to Microsoft's Windows PowerShell forum, and he has received the MVP award for Windows PowerShell from Microsoft. He is currently working on the PowerShell Bible, which is due out in June 2011 from Wiley.

Posted on August 29, 2011, in Group Policy, Podcast, PowerShell. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: