Автор: Grafus
Дата сообщения: 28.03.2015 16:52
Ребят ставлю на отдельный сервак (в домене, но не контроллер) Microsoft Exchange 2013, все идет нормально, но при добавлении Mailbox Rule выползает ошибка:
[more=ОШИБКА]
Код:
Error:
The following error was generated when "$error.Clear();
if (!$RoleIsDatacenter -and !$RoleIsDatacenterDedicated)
{
$createNewOab = $false;
$oabName = $null;
$oabAddressList = $null;
$oabVdirs = $null;
$oabGlobalWebDistribution = $false;
$oabConfiguredAttributes = $null;
Write-ExchangeSetupLog -Info ("Looking for an existing default OAB");
$defaultOab = Get-OfflineAddressBook -DomainController:$RoleDomainController | where {$_.IsDefault};
if ($defaultOab -ne $null)
{
Write-ExchangeSetupLog -Info ("Found a default OAB: " + $defaultOab.Name + "; checking its version");
if ($defaultOab.ExchangeVersion.CompareTo([Microsoft.Exchange.Data.ExchangeObjectVersion]::Exchange2012) -lt 0)
{
$e15Oab = Get-OfflineAddressBook -DomainController:$RoleDomainController | where {$_.ExchangeVersion.CompareTo([Microsoft.Exchange.Data.ExchangeObjectVersion]::Exchange2012) -eq 0};
if ($e15Oab -eq $null)
{
Write-ExchangeSetupLog -Info ("Existing OAB is Exchange 2010 or older; will create a new OAB");
$createNewOab = $true;
$oabName = $defaultOab.Name + " (Ex2013)";
$oabAddressList = $defaultOab.AddressLists;
$oabGlobalWebDistribution = $defaultOab.GlobalWebDistributionEnabled;
$oabConfiguredAttributes = $defaultOab.ConfiguredAttributes;
}
else
{
Write-ExchangeSetupLog -Info ("Already has an existing Exchange 2013 OAB:" + $e15Oab.Name + "; will not create a new OAB");
}
}
else
{
Write-ExchangeSetupLog -Info ("Existing OAB is Exchange 2013 or newer; will not create a new OAB");
}
}
else
{
Write-ExchangeSetupLog -Info ("Did not find a default OAB; will create one");
$createNewOab = $true;
$oabName = [Microsoft.Exchange.Data.Directory.SystemConfiguration.OfflineAddressBook]::DefaultName;
$nonDefaultOabWithDefaultName = Get-OfflineAddressBook $oabName -DomainController:$RoleDomainController -ErrorAction SilentlyContinue | where {$_.IsDefault -eq $false};
if ($nonDefaultOabWithDefaultName -ne $null)
{
$createNewOab = $false;
Write-ExchangeSetupLog -Warning `
("Offline address book " + `
$nonDefaultOabWithDefaultName.Name + `
" already exists: " + `
$nonDefaultOabWithDefaultName.DistinguishedName + `
". Use administrative tools to change it to default OAB.");
}
$allGals = @(Get-GlobalAddressList -DomainController:$RoleDomainController | where {$_.IsDefaultGlobalAddressList});
if ($allGals -eq $null -or $allGals.Count -eq 0)
{
$createNewOab = $false;
Write-ExchangeSetupLog -Warning `
("Couldn't find the default global address list. The default offline address book can't be created.");
}
elseif ($allGals.Count -gt 1)
{
$createNewOab = $false;
Write-ExchangeSetupLog -Warning `
("Found " + $allGals.Count + " default global address lists. You can have only one default global address list in your organization. The default offline address book will not be created.");
}
else
{
$oabAddressList = $allGals[0];
Write-ExchangeSetupLog -Info ("OAB will be based on default GAL: " + $oabAddressList.Name);
}
}
if ($createNewOab)
{
if ($oabGlobalWebDistribution -eq $false)
{
$currentAdSiteDn = (Get-ExchangeServer $RoleFqdnOrName -DomainController:$RoleDomainController).Site.DistinguishedName;
$allOabVdirs = @(Get-OabVirtualDirectory -ADPropertiesOnly -DomainController:$RoleDomainController);
$e15MinimumServerVersion = New-Object Microsoft.Exchange.Data.ServerVersion([Microsoft.Exchange.Data.Directory.SystemConfiguration.Server]::E15MinVersion);
if ($allOabVdirs -ne $null -and $allOabVdirs.Count -gt 0)
{
foreach ($oabVdir in $allOabVdirs)
{
if ([Microsoft.Exchange.Data.ServerVersion]::Compare($oabVdir.AdminDisplayVersion, $e15MinimumServerVersion) -gt 0)
{
$oabVdirSiteDn = (Get-ExchangeServer $oabVdir.Server -DomainController:$RoleDomainController).Site.DistinguishedName;
if ($oabVdirSiteDn -eq $currentAdSiteDn)
{
$oabVdirs = $oabVdir;
break;
}
elseif ($oabVdirs -eq $null)
{
$oabVdirs = $oabVdir;
}
}
}
}
if ($oabVdirs -ne $null)
{
Write-ExchangeSetupLog -Info ("OAB will be distributed to OAB virtual directory " + $oabVdirs.Name);
}
else
{
Write-ExchangeSetupLog -Info ("Could not find any OAB virtual directories; OAB will be configured without distribution.");
}
}
try
{
Write-ExchangeSetupLog -Info ("Creating new default OAB.");
$newOab = New-OfflineAddressBook `
-Name $oabName `
-AddressLists $oabAddressList `
-VirtualDirectories $oabVdirs `
-GlobalWebDistributionEnabled $oabGlobalWebDistribution `
-IsDefault $true `
-DomainController:$RoleDomainController;
}
catch [Microsoft.Exchange.Data.Directory.ADObjectAlreadyExistsException]
{
Write-ExchangeSetupLog -Warning ("Tried to create new default OAB but the object already exists; it may have been created by another instance of setup.");
}
if ($oabConfiguredAttributes -ne $null)
{
Write-ExchangeSetupLog -Info ("Setting OAB ConfiguredAttributes to: " + $oabConfiguredAttributes);
Set-OfflineAddressBook $newOab -ConfiguredAttributes $oabConfiguredAttributes -DomainController:$RoleDomainController;
}
}
}
" was run: "Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException: Address list or global address list "tp.loc/Configuration/Deleted Objects/???????????
DEL:995a107a-b333-40a7-be6c-7c4e639fd204" was not found. Please make sure you typed the identity correctly.
at Microsoft.Exchange.Configuration.Tasks.DataAccessTask`1.GetDataObject[TObject](IIdentityParameter id, IConfigDataProvider session, ObjectId rootID, OptionalIdentityData optionalData, Nullable`1 notFoundError, Nullable`1 multipleFoundError, ExchangeErrorCategory errorCategory)
at Microsoft.Exchange.Configuration.Tasks.DataAccessTask`1.GetDataObject[TObject](IIdentityParameter id, IConfigDataProvider session, ObjectId rootID, Nullable`1 notFoundError, Nullable`1 multipleFoundError)
at Microsoft.Exchange.Management.SystemConfigurationTasks.OfflineAddressBookTaskUtility.ValidateAddressBook(IConfigDataProvider session, AddressBookBaseIdParameter[] addressBooks, GetUniqueObject getAddressBook, OfflineAddressBook target, TaskErrorLoggingDelegate writeError)
at Microsoft.Exchange.Management.SystemConfigurationTasks.NewOfflineAddressBookInternal.PrepareDataObject()
at Microsoft.Exchange.Configuration.Tasks.SetTaskBase`1.InternalValidate()
at Microsoft.Exchange.Configuration.Tasks.NewMultitenancySystemConfigurationObjectTask`1.InternalValidate()
at Microsoft.Exchange.Management.SystemConfigurationTasks.NewOfflineAddressBookInternal.InternalValidate()
at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".
Error:
The following error was generated when "$error.Clear();
if (!$RoleIsDatacenter -and !$RoleIsDatacenterDedicated)
{
$createNewOab = $false;
$oabName = $null;
$oabAddressList = $null;
$oabVdirs = $null;
$oabGlobalWebDistribution = $false;
$oabConfiguredAttributes = $null;
Write-ExchangeSetupLog -Info ("Looking for an existing default OAB");
$defaultOab = Get-OfflineAddressBook -DomainController:$RoleDomainController | where {$_.IsDefault};
if ($defaultOab -ne $null)
{
Write-ExchangeSetupLog -Info ("Found a default OAB: " + $defaultOab.Name + "; checking its version");
if ($defaultOab.ExchangeVersion.CompareTo([Microsoft.Exchange.Data.ExchangeObjectVersion]::Exchange2012) -lt 0)
{
$e15Oab = Get-OfflineAddressBook -DomainController:$RoleDomainController | where {$_.ExchangeVersion.CompareTo([Microsoft.Exchange.Data.ExchangeObjectVersion]::Exchange2012) -eq 0};
if ($e15Oab -eq $null)
{
Write-ExchangeSetupLog -Info ("Existing OAB is Exchange 2010 or older; will create a new OAB");
$createNewOab = $true;
$oabName = $defaultOab.Name + " (Ex2013)";
$oabAddressList = $defaultOab.AddressLists;
$oabGlobalWebDistribution = $defaultOab.GlobalWebDistributionEnabled;
$oabConfiguredAttributes = $defaultOab.ConfiguredAttributes;
}
else
{
Write-ExchangeSetupLog -Info ("Already has an existing Exchange 2013 OAB:" + $e15Oab.Name + "; will not create a new OAB");
}
}
else
{
Write-ExchangeSetupLog -Info ("Existing OAB is Exchange 2013 or newer; will not create a new OAB");
}
}
else
{
Write-ExchangeSetupLog -Info ("Did not find a default OAB; will create one");
$createNewOab = $true;
$oabName = [Microsoft.Exchange.Data.Directory.SystemConfiguration.OfflineAddressBook]::DefaultName;
$nonDefaultOabWithDefaultName = Get-OfflineAddressBook $oabName -DomainController:$RoleDomainController -ErrorAction SilentlyContinue | where {$_.IsDefault -eq $false};
if ($nonDefaultOabWithDefaultName -ne $null)
{
$createNewOab = $false;
Write-ExchangeSetupLog -Warning `
("Offline address book " + `
$nonDefaultOabWithDefaultName.Name + `
" already exists: " + `
$nonDefaultOabWithDefaultName.DistinguishedName + `
". Use administrative tools to change it to default OAB.");
}
$allGals = @(Get-GlobalAddressList -DomainController:$RoleDomainController | where {$_.IsDefaultGlobalAddressList});
if ($allGals -eq $null -or $allGals.Count -eq 0)
{
$createNewOab = $false;
Write-ExchangeSetupLog -Warning `
("Couldn't find the default global address list. The default offline address book can't be created.");
}
elseif ($allGals.Count -gt 1)
{
$createNewOab = $false;
Write-ExchangeSetupLog -Warning `
("Found " + $allGals.Count + " default global address lists. You can have only one default global address list in your organization. The default offline address book will not be created.");
}
else
{
$oabAddressList = $allGals[0];
Write-ExchangeSetupLog -Info ("OAB will be based on default GAL: " + $oabAddressList.Name);
}
}
if ($createNewOab)
{
if ($oabGlobalWebDistribution -eq $false)
{
$currentAdSiteDn = (Get-ExchangeServer $RoleFqdnOrName -DomainController:$RoleDomainController).Site.DistinguishedName;
$allOabVdirs = @(Get-OabVirtualDirectory -ADPropertiesOnly -DomainController:$RoleDomainController);
$e15MinimumServerVersion = New-Object Microsoft.Exchange.Data.ServerVersion([Microsoft.Exchange.Data.Directory.SystemConfiguration.Server]::E15MinVersion);
if ($allOabVdirs -ne $null -and $allOabVdirs.Count -gt 0)
{
foreach ($oabVdir in $allOabVdirs)
{
if ([Microsoft.Exchange.Data.ServerVersion]::Compare($oabVdir.AdminDisplayVersion, $e15MinimumServerVersion) -gt 0)
{
$oabVdirSiteDn = (Get-ExchangeServer $oabVdir.Server -DomainController:$RoleDomainController).Site.DistinguishedName;
if ($oabVdirSiteDn -eq $currentAdSiteDn)
{
$oabVdirs = $oabVdir;
break;
}
elseif ($oabVdirs -eq $null)
{
$oabVdirs = $oabVdir;
}
}
}
}
if ($oabVdirs -ne $null)
{
Write-ExchangeSetupLog -Info ("OAB will be distributed to OAB virtual directory " + $oabVdirs.Name);
}
else
{
Write-ExchangeSetupLog -Info ("Could not find any OAB virtual directories; OAB will be configured without distribution.");
}
}
try
{
Write-ExchangeSetupLog -Info ("Creating new default OAB.");
$newOab = New-OfflineAddressBook `
-Name $oabName `
-AddressLists $oabAddressList `
-VirtualDirectories $oabVdirs `
-GlobalWebDistributionEnabled $oabGlobalWebDistribution `
-IsDefault $true `
-DomainController:$RoleDomainController;
}
catch [Microsoft.Exchange.Data.Directory.ADObjectAlreadyExistsException]
{
Write-ExchangeSetupLog -Warning ("Tried to create new default OAB but the object already exists; it may have been created by another instance of setup.");
}
if ($oabConfiguredAttributes -ne $null)
{
Write-ExchangeSetupLog -Info ("Setting OAB ConfiguredAttributes to: " + $oabConfiguredAttributes);
Set-OfflineAddressBook $newOab -ConfiguredAttributes $oabConfiguredAttributes -DomainController:$RoleDomainController;
}
}
}
" was run: "System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Identity' because it is null.
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)".