Blog de Augusto Simoes (MVP)

Sharepoint, OCS, Windows Server ...

Augusto Simoes

Consultant Infrastructure & Trainer

Ma mission est de concevoir les architectures de messageries unifiés et collaboratives afin d'accompagner nos clients vers ces nouvelles technologies.

  • Microsoft Certified Trainer
  • Microsoft Certified Systems Engineer
  • Microsoft Certified Technology Specialist :SharePoint, WSS, OCS 2007, Vista, Windows 2008
  • Microsoft Certified Database Administrator SQL 2000, 2005


MVP Logo


MyTag

Mon Profile Chez Microsoft



 

 

RecentComments

Comment RSS

[PowerShell] Guide rapide des commandes PowerShell

Microsoft vient de publier un guide rapide des commandes PowerShell. Celui traite les points suivants:

How to Access Arguments - How to Use Colored Text - How to Insert a Paragraph Return - How to Write in Reverse Video - How to Insert Comments - How to Create Multi-Command Lines - How to Make Comparisons - How to Insert Line Breaks - How to Solicit Input - How to Read a Text File - How to Write to a Text File - How to Write Conditional Statements - How to Write For and For Each Loops - How to Write Do Loops - How to Print Data - How to Create a COM Object - How to Create a .NET Object - How to Select Properties - How to Sort Data - How to Work with WMI - How to Bind to Active Directory - How to Bind to Local Accounts - How to Get Help - How to Change Security Settings - How to “Interrogate” an Object - How to Clear the Console Window

To bind to an Active Directory account use the LDAP provider:

$a = [adsi] "LDAP://cn=kenmyer, `
    ou=Finance, dc=fabrikam, dc=com"

Listing all the objects in an OU is a little more complicated; 
however, one relatively easy way to accomplish this task is to bind 
to the OU and then use the PSBase_GetChildren() method to retrieve 
a collection of items stored in that OU:

$objOU = [ADSI]`
"LDAP://ou=Finance,dc=fabrikam,dc=com" 
$users = $objOU.PSBase.Get_Children() 
$users | Select-Object displayName

Vous pouvez retrouver ce guide sur le site Microsoft


Bookmark and Share

Posted: Feb 09 2010, 08:24 by collaboration | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: PowerShell

Add comment




biuquote
  • Comment
  • Preview
Loading

captcha

*