< Back
New-MrFunction
Post
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
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