< Back

New-MrFunction

Sat Jan 18, 2020 4:36 pm

NAME New-MrFunction



SYNOPSIS

Creates a new PowerShell function in the specified location.





SYNTAX

New-MrFunction [[-Name] <String>] [[-Path] <String>] [<CommonParameters>]





DESCRIPTION

New-MrFunction is an advanced function that creates a new PowerShell function in the

specified location including creating a Pester test for the new function.





PARAMETERS

-Name <String>

Name of the function.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

Path of the location where to create the function. This location must already exist.



Required? false

Position? 2

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

System.IO.FileInfo





NOTES





Author: Mike F Robbins

Website: http://mikefrobbins.com

Twitter: @mikefrobbins



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



PS C:\\>New-MrFunction -Name Get-MrPSVersion -Path "$env:ProgramFiles\\WindowsPowerShell\\Modules\\MyModule"















RELATED LINKS