共用方式為


Cmdlets Roasting on an Open Fire

Summary: Are there new cmdlets in the Active Directory PowerShell module in Windows Server 2012 R2?

Microsoft Scripting Guy, Ed Wilson, is here. Today we have an extra guest post from Ian Farr, who explores if there are new cmdlets in the Active Directory PowerShell module in Windows Server 2012 R2. I like it when Christmas comes early…

Are there any additional cmdlets included in the Active Directory PowerShell module in Windows Server 2012 R2? Let’s look…

I ran (Get-Command -Module ActiveDirectory).count on a computer running Windows Server 2012 (HALODC01) and got 135. On the computer running Windows Server 2012 R2 (HALODC03), wait for it…

147 were returned!

I used Windows PowerShell to find out about these new cmdlets. I retrieved a list of Windows Server 2012 Active Directory cmdlets:

$2012R1 = Invoke-Command -ComputerName HALODC01 -ScriptBlock {(Get-Command -Module ActiveDirectory).Name}

Next, a list of Windows Server 2012 R2 Active Directory cmdlets: 

$2012R2 = Invoke-Command -ComputerName HALODC03 -ScriptBlock {(Get-Command -Module ActiveDirectory).Name}

Finally, a comparison of the cmdlets from the two modules:

Compare-Object -ReferenceObject $2012R1 -DifferenceObject $2012R2

The results:

Merry Scriptmas, one and all!

~Ian

Thanks, Ian!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy