The value of $notValidUser is returned to the command that called validateUser
and all processing for the function is complete.
if ($userMB.RecipientTypeDetails -ne ???UserMailbox???)
{
$notValidUser = $true
Write-Host -fore yellow ???`nThe mailbox enabled account specified is not a
user mailbox.`n???
return $notValidUser
}
The last command in the function only executes if all three if statements evaluate false and returns the
value stored in $notValidUser , which was set to $false at the beginning of the function.
return $notValidUser
The second function definition called validatePFStore is used to determine the current status of the
public folder store that acts as the default public folder store for the user as determined by the mailbox
database where the user ??™ s mailbox is located. The errors generated when the public folder store is
unavailable are ambiguous, so this function serves as a more friendly way to inform the administrator
that a problem exists with the public folder store.
Chapter 15: User, Group, and Public Folder Administration
459
To keep track of whether the public folder database is up or down, the $databaseNotUp variable is set
to $false . This is the value that is returned to the command that called validatePFStore if the test
passes and the public folder store is available.
Pages:
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636