Hi,
I am developing a script for helpdesk guys to carry out certain tasks of Office 365 Management of user/shared mailboxes.
This is what I intend to do:
1) create a GUI with 10 seperate tasks for mailbox management as radio buttons.
2) For each task, assign a radio button
3) Run a background powershell command to execute the task
4) Pull the information output from powershell command to the GUI
I managed to create the GUI with 10 seperate tasks using PrimalTools CE.
I have the powershell commands ready.
But I am unable to integrate the powershell commands to those individual radio buttons.
I am a bit new to scripting so appreciate If anyone can help me direct in the correct direction.
Thanks
Saurabh
Calling powershell command using Radio Button
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Calling powershell command using Radio Button
You have to manually add the script to the 'OnChange" event of the radio button.
$radio1.add_OnChange({ #code } )
This will fire whenever to button changes.
The easy way to add is this:
$radio1.add_OnChange({ #code } )
This will fire whenever to button changes.
The easy way to add is this:
PowerShell Code
Double-click the code block to select all.$radiobutton1_CheckedChanged={ if($this.Checked){ #TODO: Place custom script here } } $radiobutton1.add_CheckedChanged($radiobutton1_CheckedChanged)
Re: Calling powershell command using Radio Button
Thanks for the update jvierra.
I have the script running. But there is a problem. When I run the script from Power Shell studio, the Input boxes come up as expected.
But when I run the script using powershell, the input is asked in the powershell window and not in the tool's input box.
I want to intergrate only one input box for all the queries I am running in the tool.
Any ideas you can share for this?
Thanks in advance for your help.
I have the script running. But there is a problem. When I run the script from Power Shell studio, the Input boxes come up as expected.
But when I run the script using powershell, the input is asked in the powershell window and not in the tool's input box.
I want to intergrate only one input box for all the queries I am running in the tool.
Any ideas you can share for this?
Thanks in advance for your help.
Re: Calling powershell command using Radio Button
There are no input boxes in the code I posted so I do not know what you are talking about.
There is no reason for an export to be any different from running in PS2012
There is no reason for an export to be any different from running in PS2012