PSModuleInfo PSModuleInfo PSModuleInfo Class

Definition

Class describing a PowerShell module...

public sealed class PSModuleInfo
type PSModuleInfo = class
Public NotInheritable Class PSModuleInfo
Inheritance
PSModuleInfoPSModuleInfoPSModuleInfo

Constructors

PSModuleInfo(Boolean) PSModuleInfo(Boolean) PSModuleInfo(Boolean)

Default constructor to create an empty module info.

PSModuleInfo(ScriptBlock) PSModuleInfo(ScriptBlock) PSModuleInfo(ScriptBlock)

Construct a PSModuleInfo instance initializing it from a scriptblock instead of a script file.

Properties

AccessMode AccessMode AccessMode

Controls the module access mode...

Author Author Author

Module Author

ClrVersion ClrVersion ClrVersion

CLR Version

CompanyName CompanyName CompanyName

Company Name

CompatiblePSEditions CompatiblePSEditions CompatiblePSEditions

CompatiblePSEditions

Copyright Copyright Copyright

Copyright

Definition Definition Definition

If this is a script module, then this property will contain the PowerShell source text that was used to define this module.

Description Description Description

A description of this module...

DotNetFrameworkVersion DotNetFrameworkVersion DotNetFrameworkVersion

.NET Framework Version

ExportedAliases ExportedAliases ExportedAliases

Lists the aliases exported by this module.

ExportedCmdlets ExportedCmdlets ExportedCmdlets

Lists the functions exported by this module...

ExportedCommands ExportedCommands ExportedCommands

Gets the aggregated list of visible commands exported from the module. If there are two commands of different types exported with the same name (e.g. alias 'foo' and cmdlet 'foo') the combined dictionary will only contain the highest precedence cmdlet (e.g. the alias 'foo' since aliases shadow cmdlets.

ExportedDscResources ExportedDscResources ExportedDscResources
ExportedFormatFiles ExportedFormatFiles ExportedFormatFiles

The list of Format files imported by this module.

ExportedFunctions ExportedFunctions ExportedFunctions

Lists the functions exported by this module...

ExportedTypeFiles ExportedTypeFiles ExportedTypeFiles

The list of types files imported by this module.

ExportedVariables ExportedVariables ExportedVariables

Lists the variables exported by this module.

ExportedWorkflows ExportedWorkflows ExportedWorkflows

Lists the workflows exported by this module.

FileList FileList FileList

FileList

Guid Guid Guid

The guid for this module if one was defined in the module manifest.

HelpInfoUri HelpInfoUri HelpInfoUri

The HelpInfo for this module if one was defined in the module manifest.

IconUri IconUri IconUri

IconUri of this module.

ImplementingAssembly ImplementingAssembly ImplementingAssembly

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.

LicenseUri LicenseUri LicenseUri

LicenseUri of this module.

LogPipelineExecutionDetails LogPipelineExecutionDetails LogPipelineExecutionDetails

Get/set whether to log Pipeline Execution Detail events.

ModuleBase ModuleBase ModuleBase

Get the module base directory for this module. For modules loaded via a module manifest, this will be the directory containing the manifest file rather than the directory containing the actual module file. This is particularly useful when loading a GAC'ed assembly.

ModuleList ModuleList ModuleList

ModuleList

ModuleType ModuleType ModuleType

True if the module was compiled (i.e. a .DLL) instead of being in PowerShell script...

Name Name Name

The name of this module.

NestedModules NestedModules NestedModules

Returns the list of child modules of this module. This will only be non-empty for module manifests.

OnRemove OnRemove OnRemove

Optional script that is going to be called just before Remove-Module cmdlet removes the module

Path Path Path

The path to the file that defined this module...

PowerShellHostName PowerShellHostName PowerShellHostName

PowerShell Host Name

PowerShellHostVersion PowerShellHostVersion PowerShellHostVersion

PowerShell Host Version

PowerShellVersion PowerShellVersion PowerShellVersion

PowerShell Version

Prefix Prefix Prefix

Prefix

PrivateData PrivateData PrivateData

This value is set from the PrivateData member in the module manifest. It allows implementor specific data to be passed to the module via the manifest file.

ProcessorArchitecture ProcessorArchitecture ProcessorArchitecture

Processor Architecture

ProjectUri ProjectUri ProjectUri

ProjectUri of this module.

ReleaseNotes ReleaseNotes ReleaseNotes

ReleaseNotes of this module.

RepositorySourceLocation RepositorySourceLocation RepositorySourceLocation

Repository SourceLocation of this module.

RequiredAssemblies RequiredAssemblies RequiredAssemblies

Required Assemblies

RequiredModules RequiredModules RequiredModules

Returns the list of required modules of this module. This will only be non-empty for module manifests.

RootModule RootModule RootModule

Root Module

Scripts Scripts Scripts

Scripts to Process

SessionState SessionState SessionState

The session state instance associated with this module.

Tags Tags Tags

Tags of this module.

UseAppDomainLevelModuleCache UseAppDomainLevelModuleCache UseAppDomainLevelModuleCache

Enables or disables the appdomain module path cache

Version Version Version

The version of this module

Methods

AsCustomObject() AsCustomObject() AsCustomObject()

Build a custom object out of this module...

ClearAppDomainLevelModulePathCache() ClearAppDomainLevelModulePathCache() ClearAppDomainLevelModulePathCache()

Clear out the appdomain-level module path cache.

Clone() Clone() Clone()

Implements deep copy of a PSModuleInfo instance. A new PSModuleInfo instance

GetAppDomainLevelModuleCache() GetAppDomainLevelModuleCache() GetAppDomainLevelModuleCache()

A method available in debug mode providing access to the module path cache.

GetExportedTypeDefinitions() GetExportedTypeDefinitions() GetExportedTypeDefinitions()

Lists the types (PowerShell classes, enums, interfaces) exported by this module. This returns ASTs for types, created in parse time.

GetVariableFromCallersModule(String) GetVariableFromCallersModule(String) GetVariableFromCallersModule(String)

This routine allows you to get access variable objects in the callers module or from the toplevel sessionstate if there is no calling module.

Invoke(ScriptBlock, Object[]) Invoke(ScriptBlock, Object[]) Invoke(ScriptBlock, Object[])

Invoke a scriptblock in the context of this module...

NewBoundScriptBlock(ScriptBlock) NewBoundScriptBlock(ScriptBlock) NewBoundScriptBlock(ScriptBlock)

Returns a new scriptblock bound to this module instance.

ToString() ToString() ToString()

ToString() implementation which returns the name of the module.

Applies to