cliMenu
cliMenu copied to clipboard
Overwrite menus
If I run the script once, then edit the script by adding another menu item. It doesn't show up until I close PowerShell and re-open and run the script from a clean PowerShell.
Is there something that can be done so that if a new script is run it clears all the menus out, that or either when show menu exits it clears all the menus.
hi, Sorry for the late reply. No need to restart powershell, just unload the module with Remove-Module. Also you should be able to "edit" the menu at runtime. If you have a main-menu, use something like this:
Get-Menu -Name "menuName" | new-menuItem @newMenuItem
Moving forward I think we might need a set-menu cmdlet. I will take it into consideration, thank you.
Cheers
Tore