So I'm new to GUI and I'm trying to convert my working powershell script that's entirely text based to a more userfriendly GUI interface for my colleagues who hate navigating by text.+
In an attempt to push out output of my script, I keep getting:
Microsoft.Exchange.Management.StoreTasks.MailboxFolderPermission Microsoft.Exchange.Management.StoreTasks.MailboxFolderPermission Microsoft.Exchange.Management.StoreTasks.MailboxFolderPermission
It seems anything "local" gets added to the textbox just fine, but anything from the office365 tenant gets spit back and unusuable things.
I also have it call up a grid-view as a work around for the interim because I'm sure I can get all the scripts to work as intended, but the titlebar says "System.Windows.Forms.Textbox, Text: <myemail address>" when the desired title is "Calendar Permissions for <my email address>"
It's pulling my email address from a textbox. My code is as follows:
Code: Select all
function check_calendar
{
$name = $CalendarEmail.Text
$cal = Get-MailboxFolderPermission -identity "${$name}:\calendar" | Select-Object User, AccessRights | Out-GridView -Title "Calendar Permissions for $CalendarEmail"
$output.Text = 'Grabbing calendars. A window will pop up once this is finished.'
#Added to see if it works (yet)
$output.Text = Get-MailboxFolderPermission -identity "${$name}:\calendar"
$cal
}
$buttonCheckPermissions_Click = {
check_calendar
}