Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ModuleSpecification Constructor

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Initializes a new instance of the ModuleSpecification class. Introduced in Windows PowerShell 3.0.

Namespace:   Microsoft.PowerShell.Commands
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

NameDescription
System_CAPS_pubmethodModuleSpecification()

Initializes a new instance of the ModuleSpecification object. This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubmethodModuleSpecification(Hashtable)

Initializes a new instance of the ModuleSpecification class using a module specification. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodModuleSpecification(String)

Initializes a new instance of the ModuleSpecification class using a module name. Introduced in Windows PowerShell 3.0.

The constructors allow two forms of module specification: one that takes a string (the module name), and one that takes a hash table consisting of the module name, the module version, and (optionally) the module global identifier. The ConvertTo method can be used to cast from one form of module specification to the other.

Return to top

Community Additions

Show: