Tags:
create new tag
, view all tags

Power Shell Kommandos

Power Shell starten

  • Powershell
  • Exchange-Befehle dazuladen
  • Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
  • Powershell -noexit -command "& {Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin}"

Hilfe aufrufen

  • help <Kommando>

Mailbox-Kommandos

  • get-mailbox -server dtmpf00
  • get-mailboxServer Liste aller Mailbox-Server
  • get-mailboxdatabase -server dtmpf00
  • einen Benutzer Mailbox-enablen
  • get-user <Username> | Enable-Mailbox <Database>
  • get-user vermeul | enable-mailbox -database "DTMBX00\STG01\MDB01"
  • einen Benutzer Mailbox-disablen
  • get-user <Username> | Disable-Mailbox

Mail-enablen (beispielsweise für Forwards)

  • =enable-MailUser swen -ExternalEmailAddress swen@gmx.ch

Objekte finden

Foreach-Schleifen

  • get-user -Filter "Notes -like '*'" | ForEach-Object { $_.Name, $_.Notes }
  • get-user -Filter "Notes -eq 'needs account'" | ForEach-Object { Set-User -Identity $_.name -Notes:"okay" }

Screen Output

  • Ausgabe als Liste «pipen»:
  • get-user vermeul | fl
  • | fl* | more

Test Outlook Web Access

Recipient-Types

Forwards

  • Forwards können (im Gegensatz zu Exchange 2003) nicht mehr durch das Setzen des targetAddress-Attributs auf dem Mailbox-User Objekt realisiert werden
  • Es muss ein Forward zu einem Mail-enabled Contact erstellt werden
  • Contact Mail-enablen: Get-Contact 'new contact' | Enable-MailContact
  • Contact Mail-disablen: Get-Contact 'new contact' | Disable-MailContact
  • danach wird man nach der ExternalEmailAddress gefragt: swen.vermeul@gmail.com
  • Forward ändern: set-mailcontact -identity 'new contact' -ExternalEmailAddress vermeul@gmx.ch
  • set-mailbox vermeul -ForwardingAddress 'new contact'
  • zusätzliche AD-Attribute, wenn ein Contact Mail-enabled wird:
proxyAddresses: SMTP:swen.vermeul@gmail.com
proxyAddresses: smtp:newcontact@xdt.dt.ethz.ch
proxyAddresses: smtp:newcontact@dt.intern.ethz.ch
proxyAddresses: smtp:newcontact@dt.ethz.ch
proxyAddresses: X400:C=CH;A= ;P=ETHZT;O=ethztest;S=contact;G=new;
targetAddress: SMTP:swen.vermeul@gmail.com
mailNickname: newcontact
internetEncoding: 1310720
showInAddressBook: CN=Default Global Address List,CN=All Global Address Lists,CN
 =Address Lists Container,CN=ETHZT,CN=Microsoft Exchange,CN=Services,CN=Configur
 ation,DC=dt,DC=ethz,DC=ch
showInAddressBook: CN=All Contacts,CN=All Address Lists,CN=Address Lists Contain
 er,CN=ETHZT,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=dt,DC=ethz,DC
 =ch
legacyExchangeDN: /o=ETHZT/ou=First Administrative Group/cn=Recipients/cn=newcon
 tact
textEncodedORAddress: c=CH;a= ;p=ETHZT;o=ethztest;s=contact;g=new;
msExchPoliciesIncluded: {9C70B746-6BD6-4C4F-8790-656693BF0BCF},{26491CFC-9E50-48
 57-861B-0CB8DF22B5D7}
msExchRecipientDisplayType: 6
msExchVersion: 4535486012416

Groups

  • Vier Gruppentypen
  • New-DistributionGroup -name "swentest3" -SamAccountName swentest3 -Type "Security"
  • New-DistributionGroup -name "swentest2" -SamAccountName swentest2 -Type "Distribution"
  • New-DynamicDistributionGroup -name "swentest4" -SamAccountName swentest4 RecipientFilter { ( (RecipientType -eq 'UserMailbox') -and -not (Name -like 'SystemMailbox*') ) }
  • Attribut groupType unterscheidet diese
  • groupType: -2147483640 Mail-Enabled Universal Security Group
  • Maillingliste mit der LDAP-Schnittstelle erstellen:
cn: test1
displayName: test1
distinguishedName: CN=test1,CN=Users,DC=dt,DC=ethz,DC=ch
dn: CN=test1,CN=Users,DC=dt,DC=ethz,DC=ch
groupType: -2147483640
info: Notes on test1
instanceType: 4
legacyExchangeDN: /o=ETHZT/ou=First Administrative Group/cn=Recipients/cn=test1
mail: test12@xdt.dt.ethz.ch
mailNickname: test1
member: CN=vermeul,OU=users,OU=ID-BD,OU=Hosting,DC=dt,DC=ethz,DC=ch
msExchALObjectVersion: 23
msExchPoliciesExcluded: {26491CFC-9E50-4857-861B-0CB8DF22B5D7}
name: test1
objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=dt,DC=ethz,DC=ch
objectClass: group
objectClass: top
objectGUID:: zl1x46XHC0K9EMxaF5iquQ==
objectSid:: AQUAAAAAAAUVAAAAeeP8U7uMM16+BD4y5kYAAA==
proxyAddresses: SMTP:test12@xdt.dt.ethz.ch
proxyAddresses: X400:c=CH;a= ;p=ETHZT;o=ethztest;s=test12;
reportToOriginator: TRUE
sAMAccountName: test1
sAMAccountType: 268435456
showInAddressBook: CN=All Groups,CN=All Address Lists,CN=Address Lists Container,CN=ETHZT,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=dt,DC=ethz,DC=ch
showInAddressBook: CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=ETHZT,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=dt,DC=ethz,DC=ch
textEncodedORAddress: c=CH;a= ;p=ETHZT;o=ethztest;s=test12;

-- SwenVermeul - 27 Apr 2009

Topic revision: r13 - 2009-08-18 - SwenVermeul
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback