Wednesday, February 9, 2011

PF - DOES NOT - Admin

One of the very few things I’ve found in Exchange 2007 that cannot be done through the command line is check/ set the calendar permissions on everyone’s mailbox.  In 2010 this is done using the Add-MailboxFolderPermission command which unfortunately is not available in 2007. The next best option is to use PFDavAdmin.  Unfortunately it refused to work on one of my mailbox servers. I can connect. It provides a list of all the mailboxes on the server. Running the permission report creates a file with no data. When I try to expand the mailbox I get an error: Could not expand http://server.domain.doman/exadmin/domain.com/mbx/mailboxname.non_ipm_subtree/:The remote server returned an error (404) Not Found
I went through the standard troubleshooting of checking security settings, using a machine in the same physical subnet, using a different privileged account, etc.  Microsoft suggested using PFDavAdmin’s replacement ExFolders however that only works if you have a 2010 server.
3 calls and three engineers later I ended up checking the Dot Net versions and digging deeper. Finally I ended up replacing the OWA exadmin virtual directory. I found someone whoi had a similar issue here on the Exchange Server Tech Center. SO I read up on it between getting put on hold and actually fixing the issue.
First I exported the folder settings to a text file.
Get-OwaVirtualDirectory <Server>\exadmin* |fl >d:\foldersettings.txt
You need to know what format the folder is using which is done like so:

Get-OwaVirtualDirectory <Server>\exadmin*

Name                       Server                     OwaVersion
----                       ------                     ----------
Exadmin (Default Web Site) <Server>               Exchange2003or2000

I needed to know that it was using Exchange 2003or2000. Then I removed the virtual directory using this command:

Remove-OwaVirtualDirectory <Server>\exadmin* -verbose


The verbose switch gives this output:

VERBOSE: Remove-OwaVirtualDirectory : Beginning processing.
VERBOSE: Remove-OwaVirtualDirectory : Administrator Active Directory session
VERBOSE: Remove-OwaVirtualDirectory : Searching objects "<server>\exadmin*"
 of type "ADOwaVirtualDirectory" under the root "$null".
VERBOSE: Remove-OwaVirtualDirectory : Previous operation run on domain
controller 'dc.local'.

Confirm
Are you sure you want to perform this action?
The Remove-OwaVirtualDirectory cmdlet is removing Outlook Web Access virtual
directory "<server>\exadmin*".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y
VERBOSE: Remove-OwaVirtualDirectory : Deleting "<Server>\Exadmin (Default
Web Site)" of type "ADOwaVirtualDirectory".
VERBOSE: Remove-OwaVirtualDirectory : Previous operation run on domain
controller 'DC.local'.
VERBOSE: Remove-OwaVirtualDirectory : Ending processing.

The command below creates a new virtual directory, using the OWA version type displayed in the first Power Shell command.

New-OwaVirtualDirectory exadmin -owaversion Exchange2003or2000 -virtualdirectorytype exadmin –verbose

The verbose switch gives you this output.

VERBOSE: New-OwaVirtualDirectory : Beginning processing.
VERBOSE: New-OwaVirtualDirectory : Administrator Active Directory session
settings are:  View Entire Forest: 'False', Default Scope:
'Domain.local', Configuration Domain Controller:
'DC.l.local',
VERBOSE: New-OwaVirtualDirectory : Searching objects
"<Server>.Domain.local" of type "Server" under the root "$null".
VERBOSE: New-OwaVirtualDirectory : Previous operation run on domain controller
'DC.local'.
VERBOSE: New-OwaVirtualDirectory : Processing object "<Server>\exadmin".
VERBOSE: Creating Outlook Web Access virtual directory "Default Web Site" on
server "<Server>.Domain.local".
VERBOSE: New-OwaVirtualDirectory : The properties changed are: "{
OwaVersion='Exchange2003or2000', VirtualDirectoryType='Exadmin',
FolderPathname='\\.\BackOfficeStorage', Url={ 'http://<Server>:80/exadmin'
}, MetabasePath='IIS://<Server>.Domain.local/W3SVC/1/ROOT/exadmin',
AuthenticationMethodFlags='Basic, Ntlm, WindowsIntegrated',
AuthenticationMethodFlags='Fba', Id='<Server>\exadmin (Default Web Site)'
}".
VERBOSE: New-OwaVirtualDirectory : Saving object "<Server>\exadmin (Default
 Web Site)" of type "ADOwaVirtualDirectory" and state "New".
VERBOSE: New-OwaVirtualDirectory : Previous operation run on domain controller
'DC.local'.
VERBOSE: New-OwaVirtualDirectory : Searching objects "<Server>\exadmin
(Default Web Site)" of type "ADOwaVirtualDirectory" under the root "$null".
VERBOSE: New-OwaVirtualDirectory : Previous operation run on domain controller
'DC.local'.

Name                       Server                     OwaVersion
----                       ------                     ----------
exadmin (Default Web Site) <Server>               Exchange2003or2000
VERBOSE: New-OwaVirtualDirectory : Ending processing.

So why does this work?  According to this TechNet article the OWA virtual directories are used to “handle Exchange 2003 Outlook Web Access requests, Exchange 2000 Outlook Web Access requests, WebDAV requests, and some administrative functions.” Ok, I knew that but why ExAdmin? We the ExADmin virtual directory is used for Exchange Administrative (or like TechNet says here, to change administrative settings and properties.) access just like the name implies and PFDavAdmin must access it to make permissions changes etc.

No comments:

Post a Comment