TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft Windows Powershell

Notices

Exchange new-mailbox parameter issue "ManagedFolderMailboxPolicy”

Microsoft Windows Powershell


Reply
 
Thread Tools Display Modes
Old 26-06-2008, 04:26 PM   #1
Niel
Guest
 
Posts: n/a
Exchange new-mailbox parameter issue "ManagedFolderMailboxPolicy”

I am having an issue with a powershell command for Exchange I am using in
Visual Basic .NET.
I am using the “Microsoft.Exchange.Management.PowerShell.Admin snap in.
The command I am using is “new-mailbox”
The parameter that I am having an issue with is “ManagedFolderMailboxPolicy”
I receive and error indication that this parameter is not supported. I
checked the documentation on this command and the documentation shows this
parameter.

Is the parameter case sensitive?

  Reply With Quote
Old 26-06-2008, 04:26 PM   #2
Marco Shaw [MVP]
Guest
 
Posts: n/a
Re: Exchange new-mailbox parameter issue "ManagedFolderMailboxPolicy”

Niel wrote:
> I am having an issue with a powershell command for Exchange I am using in
> Visual Basic .NET.
> I am using the “Microsoft.Exchange.Management.PowerShell.Admin snap in.
> The command I am using is “new-mailbox”
> The parameter that I am having an issue with is “ManagedFolderMailboxPolicy”
> I receive and error indication that this parameter is not supported. I
> checked the documentation on this command and the documentation shows this
> parameter.
>
> Is the parameter case sensitive?
>


It is not case sensitive. Might your programming be chewing up the "-"?

Can you provide your code? I know C# a bit, VB.NET pretty much zero...

There's some good Exchange devs here also:


Marco

--
Microsoft MVP - Windows PowerShell


PowerGadgets MVP


Blog:

  Reply With Quote
Old 26-06-2008, 04:26 PM   #3
Niel
Guest
 
Posts: n/a
Re: Exchange new-mailbox parameter issue "ManagedFolderMailboxPoli



"Marco Shaw [MVP]" wrote:

> Niel wrote:
> > I am having an issue with a powershell command for Exchange I am using in
> > Visual Basic .NET.
> > I am using the “Microsoft.Exchange.Management.PowerShell.Admin snap in.
> > The command I am using is “new-mailbox”
> > The parameter that I am having an issue with is “ManagedFolderMailboxPolicy”
> > I receive and error indication that this parameter is not supported. I
> > checked the documentation on this command and the documentation shows this
> > parameter.
> >
> > Is the parameter case sensitive?
> >

>
> It is not case sensitive. Might your programming be chewing up the "-"?
>
> Can you provide your code? I know C# a bit, VB.NET pretty much zero...
>
> There's some good Exchange devs here also:
>
>
> Marco
>
> --
> Microsoft MVP - Windows PowerShell
>
>
> PowerGadgets MVP
>
>
> Blog:
>
>


Private Sub CreateMailboxTest()
Dim rsConfig As RunspaceConfiguration
Dim snapInException As New PSSnapInException
Dim info As PSSnapInInfo
Dim myRunSpace As Runspace = Nothing
Dim pipeLine As Pipeline
Dim commandResults As System.Collections.ObjectModel.Collection(Of
PSObject)
Dim bReturn As Boolean = False
Dim ResultString As New StringBuilder
Dim ScriptString As New StringBuilder
Dim strPolicy As String = "RIM Policy"

Try

rsConfig = RunspaceConfiguration.Create()
info =
rsConfig.AddPSSnapIn("Microsoft.Exchange.Managemen t.PowerShell.Admin",
snapInException)
myRunSpace = RunspaceFactory.CreateRunspace(rsConfig)
myRunSpace.Open()

pipeLine = myRunSpace.CreatePipeline()

Dim pwd As New System.Security.SecureString
Dim strTest As String = ""

For intIndex As Int32 = 1 To Len("Password123")
pwd.AppendChar(Mid("Password123", intIndex, 1))
Next


Dim cmdNewMailbox As New Command("new-mailbox")
cmdNewMailbox.Parameters.Add("Name", "Test, User A")
cmdNewMailbox.Parameters.Add("DisplayName", "Test, User A")
cmdNewMailbox.Parameters.Add("alias", "TESTUSER")
cmdNewMailbox.Parameters.Add("OrganizationalUnit",
"test.com/Users")
cmdNewMailbox.Parameters.Add("UserPrincipalName", "TESTUSER" &
"@test.com")
cmdNewMailbox.Parameters.Add("SAMAccountName", "TESTUSER")
cmdNewMailbox.Parameters.Add("FirstName", "User")
cmdNewMailbox.Parameters.Add("Initials", "A")
cmdNewMailbox.Parameters.Add("LastName", "Test")
cmdNewMailbox.Parameters.Add("password", pwd)
cmdNewMailbox.Parameters.Add("ResetPasswordOnNextL ogon", False)
cmdNewMailbox.Parameters.Add("database", "Server\Database 1")
cmdNewMailbox.Parameters.Add("ManagedFolderMailbox Policy",
strPolicy)

pipeLine.Commands.Add(cmdNewMailbox)

commandResults = pipeLine.Invoke()

If IsNothing(pipeLine.Error) = False And pipeLine.Error.Count >
0 Then
Dim errorstring As New StringBuilder

For Each item As Object In pipeLine.Error.ReadToEnd()
errorstring.Append(item.ToString)
Next

MsgBox(errorstring.ToString, MsgBoxStyle.Critical, "Power
Shell Errors")

Else

For Each Obj As PSObject In commandResults
ResultString.Append(Obj.ToString)
Next

MsgBox("Completed: " & vbNewLine & vbNewLine &
ResultString.ToString, MsgBoxStyle.Information, "CreateMailbox")
bReturn = True
End If

Catch ex As System.Management.Automation.ExtendedTypeSystemExc eption
MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")
Finally
If IsNothing(myRunSpace) = False Then
myRunSpace.Close()
myRunSpace.Dispose()
End If

End Try

End Sub
  Reply With Quote
Old 26-06-2008, 04:27 PM   #4
Marco Shaw [MVP]
Guest
 
Posts: n/a
Re: Exchange new-mailbox parameter issue "ManagedFolderMailboxPoli


> cmdNewMailbox.Parameters.Add("ResetPasswordOnNextL ogon", False)
> cmdNewMailbox.Parameters.Add("database", "Server\Database 1")
> cmdNewMailbox.Parameters.Add("ManagedFolderMailbox Policy",


Move that last line around a bit, just for fun. Maybe move it 3 lines up.

I wonder if the ("database... line is not being parsed properly.

I had to close my VM. Does that command from as-is from PowerShell?
Just in case you're not following a parameter set properly...

Marco

--
Microsoft MVP - Windows PowerShell


PowerGadgets MVP


Blog:

  Reply With Quote
Old 26-06-2008, 04:27 PM   #5
Shay Levi
Guest
 
Posts: n/a
Re: Exchange new-mailbox parameter issue "ManagedFolderMailboxPoli

Hi Niel,

I'm not sure it relates but try it anyway, add the ManagedFolderMailboxPolicyAllowed
switch parameter:

Here's the parameter description from the below URL:

The ManagedFolderMailboxPolicyAllowed parameter bypasses the warning that
messaging records management features are not supported for e-mail clients
using versions of Microsoft Outlook earlier than Outlook 2007. When a managed
folder mailbox policy is assigned to a mailbox using the ManagedFolderMailboxPolicy
parameter, the warning appears by default unless ManagedFolderMailboxPolicyAllowed
is used.






---
Shay Levi
$cript Fanatic


N> "Marco Shaw [MVP]" wrote:
N>
>> Niel wrote:
>>
>>> I am having an issue with a powershell command for Exchange I am
>>> using in
>>> Visual Basic .NET.
>>> I am using the Microsoft.Exchange.Management.PowerShell.Admin snap
>>> in.
>>> The command I am using is new-mailbox
>>> The parameter that I am having an issue with is
>>> ManagedFolderMailboxPolicy
>>> I receive and error indication that this parameter is not supported.
>>> I
>>> checked the documentation on this command and the documentation
>>> shows this
>>> parameter.
>>> Is the parameter case sensitive?
>>>

>> It is not case sensitive. Might your programming be chewing up the
>> "-"?
>>
>> Can you provide your code? I know C# a bit, VB.NET pretty much
>> zero...
>>
>> There's some good Exchange devs here also:
>>
>> Marco
>>
>> --
>> Microsoft MVP - Windows PowerShell
>>
>> PowerGadgets MVP
>>
>> Blog:
>>

N> Private Sub CreateMailboxTest()
N> Dim rsConfig As RunspaceConfiguration
N> Dim snapInException As New PSSnapInException
N> Dim info As PSSnapInInfo
N> Dim myRunSpace As Runspace = Nothing
N> Dim pipeLine As Pipeline
N> Dim commandResults As
N> System.Collections.ObjectModel.Collection(Of
N> PSObject)
N> Dim bReturn As Boolean = False
N> Dim ResultString As New StringBuilder
N> Dim ScriptString As New StringBuilder
N> Dim strPolicy As String = "RIM Policy"
N> Try
N>
N> rsConfig = RunspaceConfiguration.Create()
N> info =
N> rsConfig.AddPSSnapIn("Microsoft.Exchange.Managemen t.PowerShell.Admin"
N> ,
N> snapInException)
N> myRunSpace = RunspaceFactory.CreateRunspace(rsConfig)
N> myRunSpace.Open()
N> pipeLine = myRunSpace.CreatePipeline()
N>
N> Dim pwd As New System.Security.SecureString
N> Dim strTest As String = ""
N> For intIndex As Int32 = 1 To Len("Password123")
N> pwd.AppendChar(Mid("Password123", intIndex, 1))
N> Next
N> Dim cmdNewMailbox As New Command("new-mailbox")
N> cmdNewMailbox.Parameters.Add("Name", "Test, User A")
N> cmdNewMailbox.Parameters.Add("DisplayName", "Test, User
N> A")
N> cmdNewMailbox.Parameters.Add("alias", "TESTUSER")
N> cmdNewMailbox.Parameters.Add("OrganizationalUnit",
N> "test.com/Users")
N> cmdNewMailbox.Parameters.Add("UserPrincipalName",
N> "TESTUSER" &
N> "@test.com")
N> cmdNewMailbox.Parameters.Add("SAMAccountName",
N> "TESTUSER")
N> cmdNewMailbox.Parameters.Add("FirstName", "User")
N> cmdNewMailbox.Parameters.Add("Initials", "A")
N> cmdNewMailbox.Parameters.Add("LastName", "Test")
N> cmdNewMailbox.Parameters.Add("password", pwd)
N> cmdNewMailbox.Parameters.Add("ResetPasswordOnNextL ogon",
N> False)
N> cmdNewMailbox.Parameters.Add("database", "Server\Database
N> 1")
N>
N> cmdNewMailbox.Parameters.Add("ManagedFolderMailbox Policy",
N> strPolicy)
N> pipeLine.Commands.Add(cmdNewMailbox)
N>
N> commandResults = pipeLine.Invoke()
N>
N> If IsNothing(pipeLine.Error) = False And
N> pipeLine.Error.Count >
N> 0 Then
N> Dim errorstring As New StringBuilder
N> For Each item As Object In pipeLine.Error.ReadToEnd()
N> errorstring.Append(item.ToString)
N> Next
N> MsgBox(errorstring.ToString, MsgBoxStyle.Critical,
N> "Power Shell Errors")
N>
N> Else
N>
N> For Each Obj As PSObject In commandResults
N> ResultString.Append(Obj.ToString)
N> Next
N> MsgBox("Completed: " & vbNewLine & vbNewLine &
N> ResultString.ToString, MsgBoxStyle.Information, "CreateMailbox")
N> bReturn = True
N> End If
N> Catch ex As
N> System.Management.Automation.ExtendedTypeSystemExc eption
N> MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")
N> Catch ex As Exception
N> MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")
N> Finally
N> If IsNothing(myRunSpace) = False Then
N> myRunSpace.Close()
N> myRunSpace.Dispose()
N> End If
N> End Try
N>
N> End Sub
N>


  Reply With Quote
Old 26-06-2008, 04:28 PM   #6
Shay Levi
Guest
 
Posts: n/a
Re: Exchange new-mailbox parameter issue "ManagedFolderMailboxPoli



BTW, it works from PowerShell, no errors:

$pass = Read-Host -Prompt "set user password" -AsSecureString

New-Mailbox -Name 'testing' -Alias 'testing' -OrganizationalUnit 'domain.com/Users'
-UserPrincipalName '' -SamAccountName 'testing' -FirstName
'testing' -Password $pass -Database 'ServerName\First Storage Group\Mailbox
Database' -ManagedFolderMailboxPolicy 'testPolicy' -ManagedFolderMailboxPolicyAllowed:$true


---
Shay Levi
$cript Fanatic


SL> Hi Niel,
SL>
SL> I'm not sure it relates but try it anyway, add the
SL> ManagedFolderMailboxPolicyAllowed switch parameter:
SL>
SL> Here's the parameter description from the below URL:
SL>
SL> The ManagedFolderMailboxPolicyAllowed parameter bypasses the warning
SL> that messaging records management features are not supported for
SL> e-mail clients using versions of Microsoft Outlook earlier than
SL> Outlook 2007. When a managed folder mailbox policy is assigned to a
SL> mailbox using the ManagedFolderMailboxPolicy parameter, the warning
SL> appears by default unless ManagedFolderMailboxPolicyAllowed is used.
SL>
SL>
SL>
SL> ---
SL> Shay Levi
SL> $cript Fanatic
SL>
N>> "Marco Shaw [MVP]" wrote:
N>>
>>> Niel wrote:
>>>
>>>> I am having an issue with a powershell command for Exchange I am
>>>> using in
>>>> Visual Basic .NET.
>>>> I am using the Microsoft.Exchange.Management.PowerShell.Admin
>>>> snap
>>>> in.
>>>> The command I am using is new-mailbox
>>>> The parameter that I am having an issue with is
>>>> ManagedFolderMailboxPolicy
>>>> I receive and error indication that this parameter is not
>>>> supported.
>>>> I
>>>> checked the documentation on this command and the documentation
>>>> shows this
>>>> parameter.
>>>> Is the parameter case sensitive?
>>> It is not case sensitive. Might your programming be chewing up the
>>> "-"?
>>>
>>> Can you provide your code? I know C# a bit, VB.NET pretty much
>>> zero...
>>>
>>> There's some good Exchange devs here also:
>>>
>>> Marco
>>> --
>>> Microsoft MVP - Windows PowerShell
>>>
>>> PowerGadgets MVP
>>>
>>> Blog:
>>>

N>> Private Sub CreateMailboxTest()
N>> Dim rsConfig As RunspaceConfiguration
N>> Dim snapInException As New PSSnapInException
N>> Dim info As PSSnapInInfo
N>> Dim myRunSpace As Runspace = Nothing
N>> Dim pipeLine As Pipeline
N>> Dim commandResults As
N>> System.Collections.ObjectModel.Collection(Of
N>> PSObject)
N>> Dim bReturn As Boolean = False
N>> Dim ResultString As New StringBuilder
N>> Dim ScriptString As New StringBuilder
N>> Dim strPolicy As String = "RIM Policy"
N>> Try
N>> rsConfig = RunspaceConfiguration.Create()
N>> info =
N>> rsConfig.AddPSSnapIn("Microsoft.Exchange.Managemen t.PowerShell.Admin
N>> "
N>> ,
N>> snapInException)
N>> myRunSpace = RunspaceFactory.CreateRunspace(rsConfig)
N>> myRunSpace.Open()
N>> pipeLine = myRunSpace.CreatePipeline()
N>> Dim pwd As New System.Security.SecureString
N>> Dim strTest As String = ""
N>> For intIndex As Int32 = 1 To Len("Password123")
N>> pwd.AppendChar(Mid("Password123", intIndex, 1))
N>> Next
N>> Dim cmdNewMailbox As New Command("new-mailbox")
N>> cmdNewMailbox.Parameters.Add("Name", "Test, User A")
N>> cmdNewMailbox.Parameters.Add("DisplayName", "Test, User
N>> A")
N>> cmdNewMailbox.Parameters.Add("alias", "TESTUSER")
N>> cmdNewMailbox.Parameters.Add("OrganizationalUnit",
N>> "test.com/Users")
N>> cmdNewMailbox.Parameters.Add("UserPrincipalName",
N>> "TESTUSER" &
N>> "@test.com")
N>> cmdNewMailbox.Parameters.Add("SAMAccountName",
N>> "TESTUSER")
N>> cmdNewMailbox.Parameters.Add("FirstName", "User")
N>> cmdNewMailbox.Parameters.Add("Initials", "A")
N>> cmdNewMailbox.Parameters.Add("LastName", "Test")
N>> cmdNewMailbox.Parameters.Add("password", pwd)
N>> cmdNewMailbox.Parameters.Add("ResetPasswordOnNextL ogon",
N>> False)
N>> cmdNewMailbox.Parameters.Add("database", "Server\Database
N>> 1")
N>> cmdNewMailbox.Parameters.Add("ManagedFolderMailbox Policy",
N>> strPolicy)
N>> pipeLine.Commands.Add(cmdNewMailbox)
N>> commandResults = pipeLine.Invoke()
N>>
N>> If IsNothing(pipeLine.Error) = False And
N>> pipeLine.Error.Count >
N>> 0 Then
N>> Dim errorstring As New StringBuilder
N>> For Each item As Object In pipeLine.Error.ReadToEnd()
N>> errorstring.Append(item.ToString)
N>> Next
N>> MsgBox(errorstring.ToString, MsgBoxStyle.Critical,
N>> "Power Shell Errors")
N>> Else
N>>
N>> For Each Obj As PSObject In commandResults
N>> ResultString.Append(Obj.ToString)
N>> Next
N>> MsgBox("Completed: " & vbNewLine & vbNewLine &
N>> ResultString.ToString, MsgBoxStyle.Information, "CreateMailbox")
N>> bReturn = True
N>> End If
N>> Catch ex As
N>> System.Management.Automation.ExtendedTypeSystemExc eption
N>> MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")
N>> Catch ex As Exception
N>> MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")
N>> Finally
N>> If IsNothing(myRunSpace) = False Then
N>> myRunSpace.Close()
N>> myRunSpace.Dispose()
N>> End If
N>> End Try
N>> End Sub
N>>


  Reply With Quote
Old 26-06-2008, 04:28 PM   #7
Niel
Guest
 
Posts: n/a
Re: Exchange new-mailbox parameter issue "ManagedFolderMailboxPoli



"Shay Levi" wrote:

>
>
> BTW, it works from PowerShell, no errors:
>
> $pass = Read-Host -Prompt "set user password" -AsSecureString
>
> New-Mailbox -Name 'testing' -Alias 'testing' -OrganizationalUnit 'domain.com/Users'
> -UserPrincipalName '' -SamAccountName 'testing' -FirstName
> 'testing' -Password $pass -Database 'ServerName\First Storage Group\Mailbox
> Database' -ManagedFolderMailboxPolicy 'testPolicy' -ManagedFolderMailboxPolicyAllowed:$true
>
>
> ---
> Shay Levi
> $cript Fanatic
>
>
> SL> Hi Niel,
> SL>
> SL> I'm not sure it relates but try it anyway, add the
> SL> ManagedFolderMailboxPolicyAllowed switch parameter:
> SL>
> SL> Here's the parameter description from the below URL:
> SL>
> SL> The ManagedFolderMailboxPolicyAllowed parameter bypasses the warning
> SL> that messaging records management features are not supported for
> SL> e-mail clients using versions of Microsoft Outlook earlier than
> SL> Outlook 2007. When a managed folder mailbox policy is assigned to a
> SL> mailbox using the ManagedFolderMailboxPolicy parameter, the warning
> SL> appears by default unless ManagedFolderMailboxPolicyAllowed is used.
> SL>
> SL>
> SL>
> SL> ---
> SL> Shay Levi
> SL> $cript Fanatic
> SL>
> N>> "Marco Shaw [MVP]" wrote:
> N>>
> >>> Niel wrote:
> >>>
> >>>> I am having an issue with a powershell command for Exchange I am
> >>>> using in
> >>>> Visual Basic .NET.
> >>>> I am using the “Microsoft.Exchange.Management.PowerShell.Admin
> >>>> snap
> >>>> in.
> >>>> The command I am using is “new-mailbox”
> >>>> The parameter that I am having an issue with is
> >>>> “ManagedFolderMailboxPolicy”
> >>>> I receive and error indication that this parameter is not
> >>>> supported.
> >>>> I
> >>>> checked the documentation on this command and the documentation
> >>>> shows this
> >>>> parameter.
> >>>> Is the parameter case sensitive?
> >>> It is not case sensitive. Might your programming be chewing up the
> >>> "-"?
> >>>
> >>> Can you provide your code? I know C# a bit, VB.NET pretty much
> >>> zero...
> >>>
> >>> There's some good Exchange devs here also:
> >>>
> >>> Marco
> >>> --
> >>> Microsoft MVP - Windows PowerShell
> >>>
> >>> PowerGadgets MVP
> >>>
> >>> Blog:
> >>>

> N>> Private Sub CreateMailboxTest()
> N>> Dim rsConfig As RunspaceConfiguration
> N>> Dim snapInException As New PSSnapInException
> N>> Dim info As PSSnapInInfo
> N>> Dim myRunSpace As Runspace = Nothing
> N>> Dim pipeLine As Pipeline
> N>> Dim commandResults As
> N>> System.Collections.ObjectModel.Collection(Of
> N>> PSObject)
> N>> Dim bReturn As Boolean = False
> N>> Dim ResultString As New StringBuilder
> N>> Dim ScriptString As New StringBuilder
> N>> Dim strPolicy As String = "RIM Policy"
> N>> Try
> N>> rsConfig = RunspaceConfiguration.Create()
> N>> info =
> N>> rsConfig.AddPSSnapIn("Microsoft.Exchange.Managemen t.PowerShell.Admin
> N>> "
> N>> ,
> N>> snapInException)
> N>> myRunSpace = RunspaceFactory.CreateRunspace(rsConfig)
> N>> myRunSpace.Open()
> N>> pipeLine = myRunSpace.CreatePipeline()
> N>> Dim pwd As New System.Security.SecureString
> N>> Dim strTest As String = ""
> N>> For intIndex As Int32 = 1 To Len("Password123")
> N>> pwd.AppendChar(Mid("Password123", intIndex, 1))
> N>> Next
> N>> Dim cmdNewMailbox As New Command("new-mailbox")
> N>> cmdNewMailbox.Parameters.Add("Name", "Test, User A")
> N>> cmdNewMailbox.Parameters.Add("DisplayName", "Test, User
> N>> A")
> N>> cmdNewMailbox.Parameters.Add("alias", "TESTUSER")
> N>> cmdNewMailbox.Parameters.Add("OrganizationalUnit",
> N>> "test.com/Users")
> N>> cmdNewMailbox.Parameters.Add("UserPrincipalName",
> N>> "TESTUSER" &
> N>> "@test.com")
> N>> cmdNewMailbox.Parameters.Add("SAMAccountName",
> N>> "TESTUSER")
> N>> cmdNewMailbox.Parameters.Add("FirstName", "User")
> N>> cmdNewMailbox.Parameters.Add("Initials", "A")
> N>> cmdNewMailbox.Parameters.Add("LastName", "Test")
> N>> cmdNewMailbox.Parameters.Add("password", pwd)
> N>> cmdNewMailbox.Parameters.Add("ResetPasswordOnNextL ogon",
> N>> False)
> N>> cmdNewMailbox.Parameters.Add("database", "Server\Database
> N>> 1")
> N>> cmdNewMailbox.Parameters.Add("ManagedFolderMailbox Policy",
> N>> strPolicy)
> N>> pipeLine.Commands.Add(cmdNewMailbox)
> N>> commandResults = pipeLine.Invoke()
> N>>
> N>> If IsNothing(pipeLine.Error) = False And
> N>> pipeLine.Error.Count >
> N>> 0 Then
> N>> Dim errorstring As New StringBuilder
> N>> For Each item As Object In pipeLine.Error.ReadToEnd()
> N>> errorstring.Append(item.ToString)
> N>> Next
> N>> MsgBox(errorstring.ToString, MsgBoxStyle.Critical,
> N>> "Power Shell Errors")
> N>> Else
> N>>
> N>> For Each Obj As PSObject In commandResults
> N>> ResultString.Append(Obj.ToString)
> N>> Next
> N>> MsgBox("Completed: " & vbNewLine & vbNewLine &
> N>> ResultString.ToString, MsgBoxStyle.Information, "CreateMailbox")
> N>> bReturn = True
> N>> End If
> N>> Catch ex As
> N>> System.Management.Automation.ExtendedTypeSystemExc eption
> N>> MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")
> N>> Catch ex As Exception
> N>> MsgBox(ex.Message, MsgBoxStyle.Critical, "CreateMailbox")
> N>> Finally
> N>> If IsNothing(myRunSpace) = False Then
> N>> myRunSpace.Close()
> N>> myRunSpace.Dispose()
> N>> End If
> N>> End Try
> N>> End Sub
> N>>
>
>
>

Adding the parameter ManageFolderMailboxPolicyAllowed was the key. Thank you!!
  Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 03:46 AM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional