< Back
Show-Menu
Post
NAME Show-Menu
SYNOPSIS
Show a Menu.
SYNTAX
Show-Menu [[-InvokeItem] <Int32>] [-Force] [[-MenuName] <String>] [<CommonParameters>]
DESCRIPTION
If executed without parameters, it will build and show the main Menu. If the MenuID parameter is
specified, it will show the menu with that ID. You may also use the cmdlet to invoke a specific
Menu-Item on a specific menu.
PARAMETERS
-InvokeItem <Int32>
Required? false
Position? 1
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-MenuName <String>
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
OUTPUTS
NOTES
NAME: Show-Menu
AUTHOR: Tore Groneng tore@firstpoint.no @toregroneng tore.groneng@gmail.com
LASTEDIT: Aug 2016
KEYWORDS: General scripting Controller Menu
-------------------------- EXAMPLE 1 --------------------------
C:>Show-Menu
This will show the main Menu if defined.
-------------------------- EXAMPLE 2 --------------------------
C:>Show-Menu -MenuId 1
This will show the menu at index 1. Use Get-Menu to find the index (zero-based array)
-------------------------- EXAMPLE 3 --------------------------
C:>Show-Menu -InvokeItem 2 -MenuId 0
This will invoke the Menu-Item at index 2 on the form at index 0. If the Menu-Item requires
confirmation before invoking it, the user will be prompted before invokation.
-------------------------- EXAMPLE 4 --------------------------
C:>Show-Menu -InvokeItem 2 -MenuId 0 -force
This will invoke the Menu-Item at index 2 on the form at index 0. If the Menu-Item requires
confirmation before invoking it, the user will not be prompted before invokation since the
force flag has been specified.
RELATED LINKS
SYNOPSIS
Show a Menu.
SYNTAX
Show-Menu [[-InvokeItem] <Int32>] [-Force] [[-MenuName] <String>] [<CommonParameters>]
DESCRIPTION
If executed without parameters, it will build and show the main Menu. If the MenuID parameter is
specified, it will show the menu with that ID. You may also use the cmdlet to invoke a specific
Menu-Item on a specific menu.
PARAMETERS
-InvokeItem <Int32>
Required? false
Position? 1
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-MenuName <String>
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
OUTPUTS
NOTES
NAME: Show-Menu
AUTHOR: Tore Groneng tore@firstpoint.no @toregroneng tore.groneng@gmail.com
LASTEDIT: Aug 2016
KEYWORDS: General scripting Controller Menu
-------------------------- EXAMPLE 1 --------------------------
C:>Show-Menu
This will show the main Menu if defined.
-------------------------- EXAMPLE 2 --------------------------
C:>Show-Menu -MenuId 1
This will show the menu at index 1. Use Get-Menu to find the index (zero-based array)
-------------------------- EXAMPLE 3 --------------------------
C:>Show-Menu -InvokeItem 2 -MenuId 0
This will invoke the Menu-Item at index 2 on the form at index 0. If the Menu-Item requires
confirmation before invoking it, the user will be prompted before invokation.
-------------------------- EXAMPLE 4 --------------------------
C:>Show-Menu -InvokeItem 2 -MenuId 0 -force
This will invoke the Menu-Item at index 2 on the form at index 0. If the Menu-Item requires
confirmation before invoking it, the user will not be prompted before invokation since the
force flag has been specified.
RELATED LINKS