Windows desktop applications
Collapse the table of content
Expand the table of content
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.

PSModuleInfo Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Provides information about a module, such as the name of the module file, the path to the module file, what elements are exported from the module, and more. This class cannot be inherited. This class is introduced in Windows PowerShell 2.0.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

System.Object
  System.Management.Automation.PSModuleInfo

public sealed class PSModuleInfo

NameDescription
System_CAPS_pubmethodPSModuleInfo(Boolean)

Initializes a new instance of the PSModuleInfo class that contains no resources. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodPSModuleInfo(ScriptBlock)

Initializes a new instance of the PSModuleInfo class that is created by using a script block instead of a file. Modules constructed this way are referred to as dynamic modules. This constructor is introduced by Windows PowerShell 2.0.

NameDescription
System_CAPS_pubpropertyAccessMode

Gets or sets how the module can be added and removed. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyAuthor

Gets the author of the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyClrVersion

Gets the version of the common language runtime (CLR) for the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyCompanyName

Gets the company name of the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyCopyright

Gets the copyright of the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyDefinition

Gets the module definition. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyDescription

Gets or sets a description of the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyDotNetFrameworkVersion

Gets the version of .NET Framework that is used in the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyExportedAliases

Gets a dictionary of the aliases that are exported by the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyExportedCmdlets

Gets a dictionary of the cmdlets that are exported by the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyExportedCommands

Gets the aggregated list of visible commands exported from the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyExportedDscResources

Retrieves the exported DSC resources.

System_CAPS_pubpropertyExportedFormatFiles

Gets a list of the format files that are exported by the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyExportedFunctions

Gets a dictionary of the functions exported by the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyExportedTypeFiles

Gets a list of the type files that are exported by the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyExportedVariables

Gets a dictionary of the variables exported by the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyExportedWorkflows

Gets the workflows that are exported by this module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyFileList

Gets the list of files that are contained in the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyGuid

Gets the global identifier of the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyHelpInfoUri

The HelpInfo for this module, if it is defined in the module manifest. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyIconUri

IconUri of this module.

This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubpropertyImplementingAssembly

If the module is a binary module or a script module that defines classes, this property if a reference to the assembly, otherwise it is null.

This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubpropertyLicenseUri

LicenseUri of this module.

This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubpropertyLogPipelineExecutionDetails

Gets or sets a value that indicates whether to log pipeline execution detail events. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyModuleBase

Gets the base directory for the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyModuleList

Gets the list of modules. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyModuleType

Gets the type of file that defines the module, such as a script file or an assembly. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyName

Gets the name of the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyNestedModules

Gets information about the modules that are loaded and removed with this module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyOnRemove

Gets or sets a script block that is run when the module is removed. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyPath

Gets the path to a module file or a global identifier (for dynamic modules that are not defined by a module file). This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyPowerShellHostName

Gets the name of the Windows PowerShell host. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyPowerShellHostVersion

Gets the version of the Windows PowerShell host. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyPowerShellVersion

Gets the version of Windows PowerShell. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyPrefix

Descxribes the prefix.

Introduced in Windows PowerShell 4.0.

System_CAPS_pubpropertyPrivateData

Gets or sets the private data for the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyProcessorArchitecture

Gets the processor architecture that is targeted by the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyProjectUri

ProjectUri of this module.

This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubpropertyReleaseNotes

ReleaseNotes of this module.

This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubpropertyRepositorySourceLocation

Repository SourceLocation of this module.

This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubpropertyRequiredAssemblies

Gets the required assemblies of the module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyRequiredModules

Gets information about the modules that are required to load this module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyRootModule

Gets the name of the root module for this module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyScripts

Gets the scripts to process for this module. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertySessionState

Gets or sets the current session state of the module. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyTags

Tags of this module.

This element is introduced in Windows PowerShell 5.0.

System_CAPS_pubpropertySystem_CAPS_staticUseAppDomainLevelModuleCache

Gets or sets a value that indicates whether to enable the appdomain module path cache. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyVersion

Gets the version number of the module. This property is introduced in Windows PowerShell 2.0.

NameDescription
System_CAPS_pubmethodAsCustomObject()

Generates a PSObject object whose elements reflect the functions and variables exported by the module.

System_CAPS_pubmethodSystem_CAPS_staticClearAppDomainLevelModulePathCache()

Clears the appdomain-level module path cache. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodClone()

Implements deep copy of this PSModuleInfo instance. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetExportedTypeDefinitions()

Lists the types (PowerShell classes, enums, interfaces) exported by this module.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodGetVariableFromCallersModule(String)

Provides access to variable objects in the callering module or from the top level session state if there is no calling module.

Introduced in Windows PowerShell 4.0.

System_CAPS_pubmethodInvoke(ScriptBlock, Object[])

Runs the specified script block within the scope, or session state, of the module. This method is introduced in Windows PowerShell 2.0.

System_CAPS_pubmethodNewBoundScriptBlock(ScriptBlock)

Binds a script block to the current PSModuleInfo object. This method is introduced in Windows PowerShell 2.0.

System_CAPS_pubmethodToString()

Generates a string representation of the current PSModuleInfo object. This method is introduced in Windows PowerShell 2.0.(Overrides Object.ToString().)

This object is returned by the Get-Module cmdlet.

A module is a collection of resources that can be used to define the elements available to the user. Modules can contain a single file, such as an assembly that contains cmdlet classes, or they can contain several files. For complex modules that contain several files, a module manifest can be used that provides metadata about the module.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft