This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
As I was testing again on my ADSI LargeInterger problem, see
Monad(MSH) Beta 3 is getting closer B3 did not solve this, I did Impoort the ADSI typelibrary but I did not mentioned to do it yet.
But as I used Adam for testing (see
Monad and Adam (and a preview of my to-be AD provider) My user object kind was of empty.
I was missing a lot of properties, for example the first and lastname.
becouse you will not get them back if they are not set.
you can see in the samples below how to get those properties filled,
first I used ADSIEdit to fill Firstname (Givenname) and lastname (sn),
You can see that after a RefreshCache() in MSH, I can see the New Properties,
you can also "create" the property by filling it with invokeset()
$mow = new-object system.directoryservices.directoryentry("LDAP://localhost:389/cn=mow,ou=mowOu,dc=mow,dc=adam")
MSH>$mow.get_Properties().propertynames
objectClass
cn
distinguishedName
instanceType
whenCreated
whenChanged
displayName
uSNCreated
uSNChanged
name
objectGUID
badPwdCount
badPasswordTime
pwdLastSet
objectSid
objectCategory
nTSecurityDescriptor
# did fill the First and Last Name with ADSIEdit
MSH>$mow.sn
MSH>$mow.invokeget('sn')
MSH>$mow.RefreshCache()
MSH>$mow.sn
SurName
# Making the new Property
$mow.invokeset('street',"MowDrive")
$mow.CommitChanges()
MSH>$mow.get_Properties()
PropertyName Value
------------ -----
sn SurName
givenName Mow
objectClass {top, person, organizationalPer...
cn mow
street MowDrive
distinguishedName CN=mow,OU=MowOu,DC=mow,DC=adam
instanceType 4
whenCreated 11/21/2005 12:11:42 AM
whenChanged 1/11/2006 8:43:21 PM
displayName mow
uSNCreated System.__ComObject
uSNChanged System.__ComObject
name mow
objectGUID {16, 128, 103, 97, 224, 238, 59...
badPwdCount 0
badPasswordTime System.__ComObject
pwdLastSet System.__ComObject
objectSid {1, 5, 0, 0, 22, 24, 157, 174, ...
objectCategory CN=Person,CN=Schema,CN=Configur...
nTSecurityDescriptor System.__ComObject
for now I used ADSIEdit to look up the property values, but ofcourse we get get them from Monad too , by looking at the schema, more about that later.
gr /\/\o\/\/
Tags : Monad msh