![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | error when using adsi Hello, i'm working on a VHD image (DC windows 2003 and exchange 2007) and i want just to create an OU using powershell. after looking on website i found the following code : $domain = [ADSI]"LDAP://localhost:389/DC=contoso,DC=com" $ou = $domain.create("OrganisationalUnit","ou=test") $ou = $ou.setinfo() but when i want to execute the script, i encountered this error : Unable to find type [ADSI]: make sure that the assembly containing this type is loaded. Is it normal ? Thanks Laurent |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: error when using adsi are you on PowerShell RTM ? "laurent" wrote: > Hello, > > i'm working on a VHD image (DC windows 2003 and exchange 2007) and i want > just to create an OU using powershell. > after looking on website i found the following code : > $domain = [ADSI]"LDAP://localhost:389/DC=contoso,DC=com" > $ou = $domain.create("OrganisationalUnit","ou=test") > $ou = $ou.setinfo() > > but when i want to execute the script, i encountered this error : > Unable to find type [ADSI]: make sure that the assembly containing this type > is loaded. > > Is it normal ? > Thanks > Laurent > > > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: error when using adsi thanks a lot, it was the problem...... it's an older version of powershell who comes with the vhd i launch my script after installing the RTM version and now all is fine. Laurent "/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> a écrit dans le message de news: 5408E50C-3CDB-43D0-A41F-EC1EB7378724@microsoft.com... > are you on PowerShell RTM ? > > > "laurent" wrote: > >> Hello, >> >> i'm working on a VHD image (DC windows 2003 and exchange 2007) and i want >> just to create an OU using powershell. >> after looking on website i found the following code : >> $domain = [ADSI]"LDAP://localhost:389/DC=contoso,DC=com" >> $ou = $domain.create("OrganisationalUnit","ou=test") >> $ou = $ou.setinfo() >> >> but when i want to execute the script, i encountered this error : >> Unable to find type [ADSI]: make sure that the assembly containing this >> type >> is loaded. >> >> Is it normal ? >> Thanks >> Laurent >> >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Frustrating ADSI | Stephan Winkler | PowerShell | 9 | 02-12-2007 09:07 AM |
| ADSI Documentation? | Jim Holbach | PowerShell | 3 | 10-15-2006 08:01 PM |
| Trapping and ADSI? | Dan Metzler | PowerShell | 19 | 10-09-2006 01:12 PM |
| [ADSI] getting COM properties . | /\\/\\o\\/\\/ [MVP] | PowerShell | 0 | 09-29-2006 11:36 AM |
| ADSI pwdLastSet (to UTC or not to UTC) | =?Utf-8?B?L1wvXG9cL1wvIFtNVlBd?= | PowerShell | 0 | 07-17-2006 10:32 AM |