Public Folder Powershelling Exchange Online

#Find is the PF is mail enabled

Get-PublicFolder -Identity “\Public Folder\Folder” -recurse -ResultSize Unlimited | ? { $_.MailEnabled } 

#Remove mail enabled

Set-PublicFolder “\Public Folder\Folder” -MailEnabled:$false -confirm:$False

#Delete the Public Folder now

Remove-PublicFolder -Identity “\Public Folder\Folder” -Recurse

Re-enable the PF for Mail

Enable-MailPublicFolder “\Public Folder\Folder”

 

 Unexpected error mail-enabling public folder ‘\Public Folder\Folder’: Shell: exception while executing PowerShell. Cause: Shell: exception while executing PowerShell. —> Shell: exception while executing PowerShell. —> Could not load file or assembly ‘System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. —> Could not load file or assembly ‘System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...