Morning,
I wander if you guys can help.
here is the sample
$From = Read-Host "Alias of the User Please?"
Add-MailboxFolderPermission ${From}:\Calendar –User Test01 –AccessRights Editor
Add-MailboxFolderPermission ${From}:\Calendar –User Test02 –AccessRights Editor
Add-MailboxFolderPermission ${From}:\Calendar –User Test03 –AccessRights Editor
Add-MailboxFolderPermission ${From}:\Calendar –User Test04 –AccessRights Editor
Add-MailboxFolderPermission ${From}:\contacts –User Test01 –AccessRights Editor
Add-MailboxFolderPermission ${From}:\contacts –User Test02 –AccessRights Editor
Add-MailboxFolderPermission ${From}:\contacts –User Test03 –AccessRights Editor
Add-MailboxFolderPermission ${From}:\contacts –User Test04 –AccessRights Editor
So if I run this, the user get replace and its add and blank space after the name, consequently the command failed.
Weird is, if I write-Host in front of the command, it get replace without the blank space.
What can i edit in the command to work successfully.
Cheers
E