< Back

New-Menu

Mon Jan 13, 2020 3:08 am

NAME New-Menu



SYNOPSIS

Create a new Menu





SYNTAX

New-Menu [-Name] <String> [[-DisplayName] <String>] [-IsMainMenu] [<CommonParameters>]





DESCRIPTION

You can create as many menus you like, however you may only have one main Menu. The Menu must

have a name, hence the Name parameter is Mandatory. The first Menu you create will become

the main Menu even if you do not specify the IsMainMenu switch.





PARAMETERS

-Name <String>

Normally you would like to specify a name without space and Camel-case the name.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DisplayName <String>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IsMainMenu [<SwitchParameter>]



Required? false

Position? named

Default value False

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



OUTPUTS

System.Management.Automation.PSObject





NOTES





NAME: New-Menu

AUTHOR: Tore Groneng tore@firstpoint.no @toregroneng tore.groneng@gmail.com

LASTEDIT: Aug 2016

KEYWORDS: General scripting Controller Menu



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



C:>New-Menu -Name "MainMenu"



This will create a new Menu with name MainMenu. If this is the first Menu, it will be

created as a main Menu









-------------------------- EXAMPLE 2 --------------------------



C:>New-Menu -Name "MainMenu" -IsMainMenu



This will create a new Menu with name MainMenu and set is as a main Menu









-------------------------- EXAMPLE 3 --------------------------



C:>New-Menu -Name "sub1" -DisplayName "Sub-Menu for Skype"



This will create a new Menu with name sub1 and DisplayName Sub-Menu for Skype











RELATED LINKS