PSModuleInfo Class

Definition

Class describing a PowerShell module...

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

Constructors

PSModuleInfo(Boolean)

Default constructor to create an empty module info.

PSModuleInfo(ScriptBlock)

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

Properties

AccessMode

Controls the module access mode...

Author

Module Author

ClrVersion

CLR Version

CompanyName

Company Name

CompatiblePSEditions

CompatiblePSEditions

Copyright

Copyright

Definition

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

Description

A description of this module...

DotNetFrameworkVersion

.NET Framework Version

ExperimentalFeatures
ExportedAliases

Lists the aliases exported by this module.

ExportedCmdlets

Lists the functions exported by this module...

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 precidence cmdlet (e.g. the alias 'foo' since aliases shadow cmdlets.

ExportedDscResources
ExportedFormatFiles

The list of Format files imported by this module.

ExportedFunctions

Lists the functions exported by this module...

ExportedTypeFiles

The list of types files imported by this module.

ExportedVariables

Lists the variables exported by this module.

ExportedWorkflows

Lists the workflows exported by this module.

FileList

FileList

Guid

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

HelpInfoUri

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

IconUri

IconUri of this module.

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 of this module.

LogPipelineExecutionDetails

Get/set whether to log Pipeline Execution Detail events.

ModuleBase

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

ModuleList

ModuleList

ModuleType

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

Name

The name of this module.

NestedModules

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

OnRemove

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

Path

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

PowerShellHostName

PowerShell Host Name

PowerShellHostVersion

PowerShell Host Version

PowerShellVersion

PowerShell Version

Prefix

Prefix

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

Processor Architecture

ProjectUri

ProjectUri of this module.

ReleaseNotes

ReleaseNotes of this module.

RepositorySourceLocation

Repository SourceLocation of this module.

RequiredAssemblies

Required Assemblies

RequiredModules

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

RootModule

Root Module

Scripts

Scripts to Process

SessionState

The session state instance associated with this module.

Tags

Tags of this module.

UseAppDomainLevelModuleCache

Enables or disables the appdomain module path cache

Version

The version of this module

Methods

AsCustomObject()

Build a custom object out of this module...

ClearAppDomainLevelModulePathCache()

Clear out the appdomain-level module path cache.

Clone()

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

GetExportedTypeDefinitions()

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

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 a scriptblock in the context of this module...

NewBoundScriptBlock(ScriptBlock)

Returns a new scriptblock bound to this module instance.

ToString()

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

Applies to