< Back

New-MrScriptModule

Sat Jan 18, 2020 4:36 pm

NAME New-MrScriptModule



SYNOPSIS

Creates a new PowerShell script module in the specified location.





SYNTAX

New-MrScriptModule [-Name] <String> [[-Path] <String>] [-Author] <String> [-CompanyName] <String> [-Description]

<String> [-PowerShellVersion] <String> [<CommonParameters>]





DESCRIPTION

New-MrScriptModule is an advanced function that creates a new PowerShell script module in the

specified location including creating the module folder and both the PSM1 script module file

and PSD1 module manifest.





PARAMETERS

-Name <String>

Name of the script module.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

Parent path of the location to create the script module in. This location must already exist.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Author <String>

Specifies the module author.



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CompanyName <String>

Identifies the company or vendor who created the module.



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <String>

Describes the contents of the module.



Required? true

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PowerShellVersion <String>

Specifies the minimum version of Windows PowerShell that will work with this module. For example,

you can enter 3.0, 4.0, or 5.0 as the value of this parameter.



Required? true

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None





OUTPUTS

None





NOTES





Author: Mike F Robbins

Website: http://mikefrobbins.com

Twitter: @mikefrobbins



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>New-MrScriptModule -Name MyModuleName -Path "$env:ProgramFiles\\WindowsPowerShell\\Modules" -Author 'Mike F

Robbins' -CompanyName mikefrobbins.com -Description 'Brief description of my PowerShell module' -PowerShellVersion

3.0















RELATED LINKS