Vérifie la présence d’un objet AD en faisant une recherche du DN et répond par « True » ou « False ».
[ADSI]::Exists("LDAP://CN=BLUTEAU Christophe,OU=Informatique,DC=domain,DC=local") |
Permet de traiter des chaines de cratères.
| Function | Description | Example |
| CompareTo() | Compares one string to another | (« Hello »).CompareTo(« Hello ») |
| Contains() | Returns « True » if a specified comparison string is in a string or if the comparison string is empty | (« Hello »).Contains(« ll ») |
| CopyTo() | Copies part of a string to another string | $a = (« Hello World »).toCharArray() (« User! »).CopyTo(0, $a, 6, 5) $a |
| EndsWith() | Tests whether the string ends with a specified string | (« Hello »).EndsWith(« lo ») |
| Equals() | Tests whether one string is identical to another string | (« Hello »).Equals($a) |
| IndexOf() | Returns the index of the first occurrence of a comparison string | (« Hello »).IndexOf(« l ») |
| IndexOfAny() | Returns the index of the first occurrence of any character in a comparison string | (« Hello »).IndexOfAny(« loe ») |
| Insert() | Inserts new string at a specified index in an existing string | (« Hello World »).Insert(6, « brave « ) |
| GetEnumerator() | Retrieves a new object that can enumerate all characters of a string | (« Hello »).GetEnumerator() |
| LastIndexOf() | Finds the index of the last occurrence of a specified character | (« Hello »).LastIndexOf(« l ») |
| LastIndexOfAny() | Finds the index of the last occurrence of any character of a specified string | (« Hello »).LastIndexOfAny(« loe ») |
| PadLeft() | Pads a string to a specified length and adds blank characters to the left (right-aligned string) | (« Hello »).PadLeft(10) |
| PadRight() | Pads string to a specified length and adds blank characters to the right (left-aligned string) | (« Hello »).PadRight(10) + « World! » |
| Remove() | Removes any requested number of characters starting from a specified position | (« Hello World »).Remove(5,6) |
| Replace() | Replaces a character with another character | (« Hello World »).Replace(« l », « x ») |
| Split() | Converts a string with specified splitting points into an array | (« Hello World »).Split(« l ») |
| StartsWith() | Tests whether a string begins with a specified character | (« Hello World »).StartsWith(« He ») |
| Substring() | Extracts characters from a string | (« Hello World »).Substring(4, 3) |
| ToCharArray() | Converts a string into a character array | (« Hello World »).toCharArray() |
| ToLower() | Converts a string to lowercase | (« Hello World »).toLower() |
| ToLowerInvariant() | Converts a string to lowercase using casing rules of the invariant language | (« Hello World »).toLowerInvariant() |
| ToUpper() | Converts a string to uppercase | (« Hello World »).toUpper() |
| ToUpperInvariant() | Converts a string to uppercase using casing rules of the invariant language | (« Hello World »).ToUpperInvariant() |
| Trim() | Removes blank characters to the right and left | ( » Hello « ).Trim() + « World » |
| TrimEnd() | Removes blank characters to the right | ( » Hello « ).TrimEnd() + « World » |
| TrimStart() | Removes blank characters to the left | ( » Hello « ).TrimStart() + « World » |
| Chars() | Provides a character at the specified position | (« Hello »).Chars(0) |
Export des MailContacts.
$resfile = New-Item -ItemType file -Path liste_external_contacts.csv -Force Add-Content -Path $resfile -Value "MailContactDisplayName,MailcontactAlias,MailcontactOrganizationalUnit,MailcontactExternalEmailAddress" Get-MailContact -ResultSize unlimited | ForEach-Object { Add-Content -Path $resfile -Value "$($_.DisplayName),$($_.alias),$($_.OrganizationalUnit),$($_.ExternalEmailAddress)" } |
Export des boites aux lettres qui ont des forwards actifs.
$resfile = New-Item -ItemType file -Path liste_forwards.csv -Force Add-Content -Path $resfile -Value "MailboxDisplayName,MailboxAlias,MailContactDisplayName,MailcontactOrganizationalUnit,MailcontactExternalEmailAddress" get-mailbox -ResultSize unlimited | Where-Object { $_.ForwardingAddress -ne $null } | ForEach-Object { $forward = Get-Recipient -Identity $_.ForwardingAddress if ( $forward.RecipientType -eq "MailContact") { $mailc = Get-MailContact -Identity $forward.alias Add-Content -Path $resfile -Value "$($_.name),$($_.alias),$($mailc.displayname),$($mailc.OrganizationalUnit),$($mailc.ExternalEmailAddress)" } else {} } |
Liste les boites d’une database faisant une taille entre 700MB et 900MB.
La première commande permet d’afficher les sessions RDP sur un serveur distant.
query session /server:SERVERNAME |
La seconde reset la session de l’ID séléctionné.
reset session 1 /server:SERVERNAME |
Voici les différents tableaux de compatibilités entre les versions d’Exchange et les versions de systèmes d’exploitation, d’Active Directory, explorateurs Internet…
C’est très fournit et je pense complet.
Vu la quantité d’information, voici le lien:
http://technet.microsoft.com/en-us/library/ee338574%28EXCHG.80%29.aspx
http://aidexchange.fr est maintenant PageRank 2.
Je pense que je doit ce changement de niveau à Anderson Patricio qui avec l’ajout de Christophe BLUTEAU’s blog dans son Blogroll a amélioré mon référencement.
Un grand merci à lui.

Le nombre de pages indexées du site aidexchange.fr dans les principaux moteurs de recherches:
Google: 158
Live Search: 5
Yahoo!: 3
Lycos: 0
AllTheWeb: 3
AltaVista: 3
Total: 172 pages indexées
Permet d’afficher les taille des boites se trouvant dans une OU.
Get-Mailbox -OrganizationalUnit "domain.local/OU_FI00/OU_Compta" | Get-MailboxStatistics | Sort-Object -Property TotalItemSize -Descending | ft displayname, database, @{ expression={$_.TotalItemSize.Value.ToMB() } ;label="TotalItemSize (MB)" } |
