PowerShell for Windows Admins

Mar 15 2014   4:48AM GMT

Module confusion–what’s really in PowerShell 3 and 4

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

If I run

Get-Module –ListAvailable

on my Windows 8.1 system (PowerShell 4.0) I find a total of 58 modules installed in $pshome\modules i.e. C:\windows\system32\WindowsPowerShell\v1.0\Modules

These are the modules installed as part of PowerShell. Right?

Wrong?

Compare this with a Windows 7 machine that’s been upgraded to PowerShell 4.0. Repeating the exercise I find a grand total of 15 modules.

So where has the other 75% of my functionality gone.

This is the breakdown down of the modules installed on the Windows 7 machine – terminology is mine (feel free to disagree with the groupings).

Core PowerShell:

Microsoft.PowerShell.Diagnostic

Microsoft.PowerShell.Host

Microsoft.PowerShell.Management

Microsoft.PowerShell.Security

Microsoft.PowerShell.Utility

CimCmdlets

ISE

Microsoft.WSMan.Management

File Transfer module

BitsTransfer

Troubleshooting:

PSDiagnostics

TroubleshootingPack

Other related engines:

PSDesiredStateConfiguration

PSScheduledJob

PSWorkflow

PSWorkflowUtility

and that’s it. Everything else as far as I can determine is CDXML based and therefore can’t be made available on legacy systems. The following modules are included in that category:

AppBackgroundTask

AppLocker

Appx

AssignedAccess

BitLocker

BranchCache

Defender

DirectAccessClientComponents

Dism

DnsClient

International

iSCSI

Kds

MMAgent

MsDtc

NetAdapter

NetConnection

NetEventPacketCapture

NetLbfo

NetNat

NetQos

NetSecurity

NetSwitchTeam

NetTCPIP

NetWNV

NetworkConnectivityStatus

NetworkTransition

PcsvDevice

PKI

PrintManagement

ScheduledTasks

SecureBoot

SmbShare

SmbWitness

StartScreen

Storage

TLS

TrustedPlatformModule

VpnClient

Wdac

WindowsDeveloperLicense

WindowsErrorReporting

WindowsSearch

A CDXML based module is produced by taking a CIM (WMI) class and wrapping it in some simple XML and saving it as a .cdxml file. This can then be published as a PowerShell module. The CIM classes won’t be made available on downlevel systems so you won’t find this functionality on anything earlier than Windows 8/2012.

If you need the functionality supplied by these modules you will either have to use the old command line tools or a WMI class – much of the functionality of the NetAdapter and NETCPIP modules for instance can be duplicated using Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration..

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: