Henrik Johansson
asked on
Remove Public Folder with heading \ as name
A Public Folder was accedently created as \bad folder\name and now can't do anything with it.
Get-PublicFolder -GetChildren|?{$_.Name -Like '\*'}
PowerShell line above works to find it, but trying to delete with Remove-PublicFolder or rename with Set-PublicFolder to get rid of the bad folder result in error about incorrect format of PublicFolderIdParameter. I've tried to use Exchange Online tenant as OrganizationName without effect.
If trying to use Outlook as client to do anything with it gives the behavior as not being owner of folder (grayed out delete/rename option, missing tabs in properties).
Get-PublicFolder -GetChildren | Remove-PublicFolder
Get-PublicFolder -GetChildren|?{$_.name -like '\*'} | % {Set-PublicFolder $_.identity -Name 'crap'}
Cannot process argument transformation on parameter 'Identity'. Cannot convert value "?\bad folder\name" to type "Microsoft.Exchange.Config uration.Ta sks.Public FolderIdPa rameter". Error: "The value provided for parameter "?\bad folder\name" isn't in the correct format. The correct format is "<OrganizationName>\\<Fold
erPath>"."
+ CategoryInfo : InvalidData: (:) [Set-PublicFolder], ParameterBindin...mationEx ception
+ FullyQualifiedErrorId : ParameterArgumentTransform ationError ,Set-Publi cFolder
+ PSComputerName : outlook.office365.com
Get-PublicFolder -GetChildren|?{$_.Name -Like '\*'}
PowerShell line above works to find it, but trying to delete with Remove-PublicFolder or rename with Set-PublicFolder to get rid of the bad folder result in error about incorrect format of PublicFolderIdParameter. I've tried to use Exchange Online tenant as OrganizationName without effect.
If trying to use Outlook as client to do anything with it gives the behavior as not being owner of folder (grayed out delete/rename option, missing tabs in properties).
Get-PublicFolder -GetChildren | Remove-PublicFolder
Get-PublicFolder -GetChildren|?{$_.name -like '\*'} | % {Set-PublicFolder $_.identity -Name 'crap'}
Cannot process argument transformation on parameter 'Identity'. Cannot convert value "?\bad folder\name" to type "Microsoft.Exchange.Config
erPath>"."
+ CategoryInfo : InvalidData: (:) [Set-PublicFolder], ParameterBindin...mationEx
+ FullyQualifiedErrorId : ParameterArgumentTransform
+ PSComputerName : outlook.office365.com
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER