Jump to content

-Haselier-

Abgemeldet
  • Gesamte Inhalte

    318
  • Registriert seit

  • Letzter Besuch

Alle erstellten Inhalte von -Haselier-

  1. habe NUN auf mehrfachen wunsch den code tag verwendet... bin gespannt ob der zur Problemlösung dienlich ist!!
  2. nun habe ich NUR <?xml version="1.0" encoding="utf-8" ?> <Configuration version="1.0"> <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox"> <ApiCall Name="OnComplete"> if($succeeded) { $newmailbox = $provisioningHandler.UserSpecifiedParameters["Name"] set-casmailbox $newmailbox -ImapEnabled $False } </ApiCall> </Feature> </Configuration> in der *xml datei auf beiden servern! habe einen existierenden ad account genommen und über emc ene MB zugewiesen IMAp aktiv!!! weiterer test analog zu oben NUR habe ich eine komplett NEUEN Account erstellt!!! meldung am ende des wizzards Summary: 1 item(s). 1 succeeded, 0 failed. Elapsed time: 00:00:11 mbtest6 Completed Warning: The cmdlet extension agent with the index 5 has thrown an exception in OnComplete(). The exception is: Microsoft.Exchange.Provisioning.ProvisioningException: ScriptingAgent: Exception thrown while invoking scriptlet for OnComplete API: The operation couldn't be performed because object 'mbtest6' couldn't be found on 'tb00002a.easycredit.intern'.. ---> Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException: The operation couldn't be performed because object 'mbtest6' couldn't be found on 'tb00002a.easycredit.intern'. 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.RecipientTaskHelper.ResolveDataObject[TDataObject](IConfigDataProvider dataSession, IConfigDataProvider globalCatalogSession, ADServerSettings serverSettings, IIdentityParameter identity, ObjectId rootId, OptionalIdentityData optionalData, String domainController, CategorizedGetDataObjectDelegate getDataObjectHandler, TaskVerboseLoggingDelegate logHandler, ErrorLoggerDelegate errorHandler) at Microsoft.Exchange.Configuration.Tasks.SetRecipientObjectTask`3.ResolveDataObject() at Microsoft.Exchange.Management.RecipientTasks.SetCASMailboxBase`2.ResolveDataObject() at Microsoft.Exchange.Management.RecipientTasks.SetCASMailbox.ResolveDataObject() at Microsoft.Exchange.Configuration.Tasks.SetObjectWithIdentityTaskBase`3.PrepareDataObject() at Microsoft.Exchange.Configuration.Tasks.SetRecipientObjectTask`3.PrepareDataObject() at Microsoft.Exchange.Configuration.Tasks.SetTaskBase`1.InternalValidate() at Microsoft.Exchange.Configuration.Tasks.SetObjectWithIdentityTaskBase`3.InternalValidate() at Microsoft.Exchange.Configuration.Tasks.SetRecipientObjectTask`3.InternalValidate() at Microsoft.Exchange.Management.RecipientTasks.SetCASMailboxBase`2.InternalValidate() at Microsoft.Exchange.Management.RecipientTasks.SetCASMailbox.InternalValidate() at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord() --- End of inner exception stack trace --- at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean succeeded, Exception e) at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnComplete(Task task, Boolean succeeded, Exception exception) Exchange Management Shell command completed: New-Mailbox -Name 'mbtest6' -Alias 'mbtest6' -OrganizationalUnit 'easycredit.intern/Admin/OPFW/ExSrv/MSG01/Users' -UserPrincipalName 'mbtest6@easycredit.intern' -SamAccountName 'mbtest6' -FirstName 'mbtest6' -Initials '' -LastName '' -Password 'System.Security.SecureString' -ResetPasswordOnNextLogon $false Elapsed Time: 00:00:11 IMAP Aktiv!! an euch zwei die, das getestet haben, habt ihr in eurer Testumgebung, dass wir eine DAG Umgebung implementiert haben?! so langsam bin ich ratlos!
  3. Hallo, Das heißt für mich soviel wie dass deine XML die Standardeinträge noch immer beinhaltet?! ja, ist das verkehrt? und warum verwendest du nicht den [code -Schalter? dann sieht das Ganze so aus, und ist übersichtlicher <- was meinst du mit CODE-Schalter?! ich sehe keine Unterschied von meinem zu deinem Post?! gruss
  4. teil3 $userId = (Get-User | where {$_.Sid -eq $provisioningHandler.UserScope.UserId}).Identity <!-- Do nothing if the user has recipient management role assigned. We don't enforce naming convention on admin --> foreach ($userRole in (Get-ManagementRoleAssignment -RoleAssignee $userId)) { if ((Get-ManagementRole $userRole.Role).RoleType -eq [Microsoft.Exchange.Data.Directory.SystemConfiguration.RoleType]::RecipientManagement) {return $null;} } <!-- Compose the naming convention validation regular expression: "MY-DIY-<user alias>-<free string that less than 32 characters>" --> $regExpression = "MY-DIY-" + (Get-Mailbox $userId).Alias + "-.{1,32}" <!-- Do regular expression validation --> if ([system.Text.RegularExpressions.Regex]::IsMatch($readOnlyIConfigurable.DisplayName, "^(" + $regExpression + ")$", [system.Text.RegularExpressions.RegexOptions]::IgnoreCase)) {return $null;} New-Object -type Microsoft.Exchange.Data.ProvisioningValidationError -argumentlist ("The name must follow the pattern as: MY-DIY-[Your Alias]-[Free string less than 32 characters]", [Microsoft.Exchange.Data.ExchangeErrorCategory]::Client ) </ApiCall> </Feature> <Feature Name="Auditing" Cmdlets="new-mailbox"> <ApiCall Name="Validate"> #parameter list: #param([ProvisioningHandler]$provisioningHandler, [iConfigurable]$readOnlyIConfigurable) $newObjectGuid = $readOnlyIConfigurable.Guid.ToString(); </ApiCall> <ApiCall Name="OnComplete"> #parameter list: #param([ProvisioningHandler]$provisioningHandler, [bool]$succeeded, [Exception]$exception) if($succeeded) { WriteToSQL($newObjectGuid); } </ApiCall> </Feature> <Common> function WriteToSQL { param([string]$newObjectGuid) $connectionString = GetConnectionString; $queryString = "INSERT into RecipientAudit (DistributionGroupGuid) VALUES ('$newObjectGuid')"; [reflection.assembly]::LoadWithPartialName("System.Data"); $sqlConnection = new-object -type System.Data.SqlClient.SqlConnection -argumentlist $connectionString; $command = new-object -type System.Data.SqlClient.SqlCommand -argumentlist $queryString; $command.Connection = $sqlConnection; $command.Connection.Open(); $command.ExecuteNonQuery(); $sqlConnection.Close(); } function GetConnectionString { return "server=MYSQLSERVER;uid=sa;password=myPassword;database=CmdletExtensions"; } </Common> </Configuration> <?xml version="1.0" encoding="utf-8" ?> < Configuration version="1.0"> <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox"> <ApiCall Name="OnComplete"> if($succeeded) { $newmailbox = $provisioningHandler.UserSpecifiedParameters["Name"] set-casmailbox $newmailbox -ImapEnabled $False } </ApiCall> </Feature> </Configuration> ******************* ende <- steht nicht mehr in der xml ;P
  5. teil2 er komplette inhalt meiner *.xml <?xml version="1.0" encoding="utf-8" ?> <Configuration version="1.0"> <!-- In order to enable Scripting Agent: - rename this file to ScriptingAgentConfig.xml - edit it appropriately - run the task: enable-CmdletExtensionAgent "Scripting Agent" In order to include into your scriptlet characters prohibited in XML, use escape sequences, e.g. "<",">","&" for "less than", greater than" and "ampersand respectively. --> <Feature Name="MailboxOperatorNumberProvisioning" Cmdlets="new-mailbox"> <ApiCall Name="ProvisionDefaultProperties"> #parameter list: #param([ProvisioningHandler]$provisioningHandler, [iConfigurable]$readOnlyIConfigurable) if($provisioningHandler.UserSpecifiedParameters["OperatorNumber"] -ne $null) { #if user has specified -OperatorNumber parameter, return return $null; } if($readOnlyIConfigurable.OperatorNumber -ne $null) { #if previous agent has provisioned OperatorNumber, return return $null; } $user = new-object -type Microsoft.Exchange.Data.Directory.Recipient.ADUser; $user.OperatorNumber = "911"; new-object -type Microsoft.Exchange.Data.Directory.Management.Mailbox -argumentlist $user </ApiCall> </Feature> <!-- The script enforces naming convention on distribution group. The rules to be applied are: 1. Bypass enforcement if the user is administrator. Note: we simplify this logic by only check role name 2. The name should follow the pattern as: "MY-DIY-<current user alias>-<free string that less than 32 characters>" --> <Feature Name="Name-Check" Cmdlets="new-distributiongroup,set-distributiongroup"> <ApiCall Name="Validate"> #parameter list: #param([ProvisioningHandler]$provisioningHandler, [iConfigurable]$readOnlyIConfigurable) <!-- Proceed only if -Name or -DisplayName is specified--> if (($provisioningHandler.UserSpecifiedParameters["Name"] -eq $null) -and ($provisioningHandler.UserSpecifiedParameters["DisplayName"] -eq $null)) {return $null}
  6. teil1 auf beiden DAG nodes habe ich D:\Exchsrvr\Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml inhalt: <?xml version="1.0" encoding="utf-8" ?> < Configuration version="1.0"> <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox"> <ApiCall Name="OnComplete"> if($succeeded) { $newmailbox = $provisioningHandler.UserSpecifiedParameters["Name"] set-casmailbox $newmailbox -ImapEnabled $False } </ApiCall> </Feature> </Configuration> beide *.xml files haben den gleichen status! der script agent ist aktiviert: Enable-CmdletExtensionAgent "Scripting Agent" status agenten: Get-CmdletExtensionAgent | ft name,enabled,priority -wrap -autosize Name Enabled Priority ---- ------- -------- Scripting Agent True 6 OAB Resources Management Agent True 5 Provisioning Policy Agent True 4 Mailbox Resources Management Agent True 3 Rus Agent True 2 Query Base DN Agent True 1 Admin Audit Log Agent True 255 Mailbox Creation Time Agent True 0 [PS] D:\Exchsrvr\PS-Log>Get-CmdletExtensionAgent | fl name, enabled Name : Scripting Agent Enabled : True Name : OAB Resources Management Agent Enabled : True Name : Provisioning Policy Agent Enabled : True Name : Mailbox Resources Management Agent Enabled : True Name : Rus Agent Enabled : True Name : Query Base DN Agent Enabled : True Name : Admin Audit Log Agent Enabled : True Name : Mailbox Creation Time Agent Enabled : True
  7. danke für die Info ja war ein tippfehler ... smarthost = mailrelay?!
  8. :::::::::::::::: danke für deine Mühe, jedoch weiter oben bereits ohne erfolg verwendet!
  9. im netz gibts keine guten dokus weder auf deutsch noch auf English...nicht mal in meinem MUT Schmöker
  10. wir haben e2010 2 node cluster im DAG mailversand Mitarbeiter - huber@contoso.com (innerhalb der mail domäne contoso.com, existiert ein PF) versendet via OL eine mail nach GFL.de OL schaut am exchange ob ein postfach existiert und ob gfk.de unter trusted mail domäne zu finden ist wenn ja - routet der mailserver intern wenn nein - geht die mail an den send connector - und wohin versendet der?! 2 frage mail versand via smtp - mail konto nicht auf dem exchange - smtp versand soll aber trotzdem outbound zb an GFL.de zugestellt werden es existiert nur ein smtp mail relay für MuFu`s - die externen smtp versand betreiben Danke für eure Tipps n Anregungen
  11. ca 1400 und 15/15 DB aktiv/ passiv #deactivate IMAP $newmailbox = $provisioningHandler.UserSpecifiedParameters["Name"] D:\Exchsrvr\PS-Log\PS-Cmdlets-ExtensionAgents\Imap-disable.ps1 -name $newmailbox habe ich nun in die *.xml ... in meiner *ps1 steht get-mailbox | set-casmailbox -imapenabled $false das script - *.xml habe ich auf BEIDEN servern angepasst und es liegt da D:\Exchsrvr\Bin\CmdletExtensionAgents ich war nun extra auf dem server mit der aktiven MB ( AD account existierte) habe die MB extra auf einer aktiven Datenbank zugeordnet.. Summary: 1 item(s). 1 succeeded, 0 failed. Elapsed time: 00:00:00 mbtest2 Completed Exchange Management Shell command completed: Enable-Mailbox -Identity 'donnerhell.intern/AGCXwp/E000/999999/Users/mbtest2' -Alias 'mbtest2' -Database 'TB00058A-MB23' Elapsed Time: 00:00:00 IMAP aktiv und... ebenfall ohne erfolg: <?xml version="1.0" encoding="utf-8" ?> <Configuration version="1.0"> <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox,enable-mailbox"> <ApiCall Name="OnComplete"> if($succeeded) { $newmailbox = $provisioningHandler.UserSpecifiedParameters["Name"] D:\Exchsrvr\PS-Log\PS-Cmdlets-ExtensionAgents\Imap-disable.ps1 -name $newmailbox } </ApiCall> </Feature> </Configuration>
  12. ja Enable-CmdletExtensionAgent "Scripting Agent"
  13. wenn ich einen verweis auf ein script machen möchte 1 $newmailbox = $provisioningHandler.UserSpecifiedParameters["Name"] 2 c:\myscript.ps1 -name $newmailbox inhalt myscript.ps1 get-mailbox | set-casmailbox -imapenabled $false reicht dann zeile 1 n 2 oder brauche ich <?xml version="1.0" encoding="utf-8" ?> <Configuration version="1.0"> <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox,enable-mailbox"> <ApiCall Name="OnComplete"> .... } </ApiCall> </Feature> </Configuration> auch wieder?!
  14. habe ich soeben gemacht! (e2010 dag!!) kein erfolg!!! hat keiner die extensions im einsatz?
  15. ---> [PS] C:\>Get-CASMailbox -Identity "mbtest3" Name ActiveSyncEnabled OWAEnabled PopEnabled ImapEnabled MapiEnabled ---- ----------------- ---------- ---------- ----------- ----------- mbtest3 True True True True True IMAP aktiv ?! anwelcher stelle setze ich das "Sleep" und was bringt es? einen reboot hatten wie am WE, wg WSUS updates
  16. @ sweigl hallo, es lag an dem "Leerzeichen" danke! bleibt nur noch mein *.xml File, welches nicht funktioniert
  17. auf eine MB einzeln gehts... nur eben auf die DB selbst nicht?!?
  18. genau das ist mein problem ich habe es via ems deaktiviert, wenn ich nachsehe = true?
  19. folgendes habe ich versucht um zu testen, ob nach der deaktivierung von IMAP tatsäclich bei einer neuanlage IMAP wieder aktiv ist IMAP deaktivieren: Get-Mailbox -ResultSize unlimited | Where {$_.Database -like " TB00058A-MB23"} | Get-CASMailbox | Set-CASMailbox -ImapEnabled $false MA auf der o.g DB 301007 301007 TB00058A-MB23 301063 301063 TB00058A-MB23 301069 301069 TB00058A-MB23 800827 800827 TB00058A-MB23 802266 802266 TB00058A-MB23 301056 301056 TB00058A-MB23 Get-CASMailbox -Identity "301063" Name ActiveSyncEnabled OWAEnabled PopEnabled ImapEnabled MapiEnabled ---- ----------------- ---------- ---------- ----------- ----------- 301063 True True True True True kontrolle [PS] C:\>Get-CASMailbox -ResultSize Unlimited | Select-Object name, imapenabled | Where-Object {$_.imapenabled -match "false"} da sollten eigentlich alle o.g. MA auftreten doch das ist leider nicht der Fall ideen?
  20. kann es sein, D:\Exchsrvr\Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml es liegt bei uns in einem andern VZ?! die Frage hier:!!!! ist der wichtig!!! in welchem Verzeichniss die *.xml Datei ist?
  21. ScriptingAgentConfig.xml der Inhalt steht doch "oben" </Common> <- Inhalt von der ScriptingAgentConfig.xml.sample </Configuration> <?xml version="1.0" encoding="utf-8" ?> <Configuration version="1.0"> <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox,enable-mailbox"> <ApiCall Name="OnComplete"> if($succeeded) { $mb = $provisioningHandler.UserSpecifiedParameters["Name"] set-casmailbox $mb -ImapEnabled $false } </ApiCall> </Feature> </Configuration> ich hoffe das hilft "uns" weiter ...
  22. keiner von euch "Spezialisten" eine zündende idee?
  23. evtl hilft das: [PS] D:\Exchsrvr\PS-Log\MBRights-SA-FA>Get-CmdletExtensionAgent | ft name,enabled,priority - Name Enabled Priority ---- ------- -------- Scripting Agent True 6 OAB Resources Management Agent True 5 Provisioning Policy Agent True 4 Mailbox Resources Management Agent True 3 Rus Agent True 2 Query Base DN Agent True 1 Admin Audit Log Agent True 255 Mailbox Creation Time Agent True 0
  24. 5. EMS: 6. New-Mailbox -UserPrincipalName mbtest5@test.de -Alias mbtest5b -ResetPasswordOnNextLogon $true Info: 7. cmdlet New-Mailbox at command pipeline position 1 8. Supply values for the following parameters: 9. Name: mbtest5 10. Password: *********** 11. Name Alias ServerName ProhibitSendQuota 12. ---- ----- ---------- ----------------- 13. mbtest5 mbtest5b tb00006a unlimited 14. WARNING: The cmdlet extension agent with the index 5 has thrown an exception in 15. OnComplete(). The exception is: Microsoft.Exchange.Provisioning.ProvisioningException: 16. ScriptingAgent: Exception thrown while invoking scriptlet for OnComplete API: Exception 17. calling "ExecuteNonQuery" with "0" argument(s): "ExecuteNonQuery requires an open and 18. available Connection. The connection's current state is closed.". ---> 19. System.Management.Automation.MethodInvocationException: Exception calling 20. "ExecuteNonQuery" with "0" argument(s): "ExecuteNonQuery requires an open and available 21. Connection. The connection's current state is closed." ---> 22. System.InvalidOperationException: ExecuteNonQuery requires an open and available 23. Connection. The connection's current state is closed. 24. at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method) 25. at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, 26. SqlCommand command) 27. at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) 28. at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, 29. String methodName, Boolean sendToPipe) 30. at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 31. at ExecuteNonQuery(Object , Object[] ) 32. at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, 33. Object[] arguments, MethodInformation methodInformation, Object[] originalArguments) 34. --- End of inner exception stack trace --- 35. at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, 36. Object[] arguments, MethodInformation methodInformation, Object[] originalArguments) 37. at System.Management.Automation.ParserOps.CallMethod(Token token, Object target, 38. String methodName, Object[] paramArray, Boolean callStatic, Object valueToSet) 39. at System.Management.Automation.MethodCallNode.InvokeMethod(Object target, Object[] 40. arguments, Object value) 41. at System.Management.Automation.MethodCallNode.Execute(Array input, Pipe outputPipe, 42. ExecutionContext context) 43. at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outputPipe, 44. ArrayList& resultList, ExecutionContext context) 45. at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode 46. statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext 47. context) 48. --- End of inner exception stack trace --- 49. at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean 50. succeeded, Exception e) 51. at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnComplete(Task task, Boolean 52. succeeded, Exception exception) MB wurde angelegt aber IMAP ist immer noch “enabled!!
×
×
  • Neu erstellen...