I have the below GUI for my application. I need to execute respective powershell script based on the menu selection
from tkinter import *
from tkinter.ttk import *
from time import strftime
# creating tkinter window
root = Tk()
root.title('Menu Demonstration')
# Creating Menubar
menubar = Menu(root)
# Adding File Menu and commands
file = Menu(menubar, tearoff = 0)
menubar.add_cascade(label ='InfoBlox', menu = file)
file.add_command(label ='Add CNAME record', command = None)
file.add_command(label ='Add A-record and PTR record', command = None)
file.add_separator()
file.add_command(label ='Exit', command = root.destroy)
# Adding Edit Menu and commands
edit = Menu(menubar, tearoff = 0)
menubar.add_cascade(label ='Installation', menu = edit)
edit.add_command(label ='Chrome', command = None)
# Adding Help Menu
ad_ = Menu(menubar, tearoff = 0)
menubar.add_cascade(label ='Active Directory', menu = ad_)
ad_.add_command(label ='Add server in group', command = None)
# display Menu
root.config(menu = menubar)
mainloop()
Please let me know how can I click the menu options to call and execute powershell scripts