Home All Groups Group Topic Archive Search About


Author
11 May 2005 6:26 PM
GIXER
Hi,
need help to make a script that do this:
read an AD user's attribute and based on that attribute update other
attibutes that are stored in a excel spreadsheet...
Thanks
Miguel
Portugal

Author
11 May 2005 9:51 PM
Corné Bogaarts
You might wanna start here
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting04132004.asp)
and then go on with this
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting05112004.asp).

Use this tool
(http://www.microsoft.com/technet/scriptcenter/tools/admatic.mspx) to help you
find the correct AD-fields.


Show quote
On Wed, 11 May 2005 11:26:06 -0700, "GIXER" <GI***@discussions.microsoft.com>
wrote:

>Hi,
>need help to make a script that do this:
>read an AD user's attribute and based on that attribute update other
>attibutes that are stored in a excel spreadsheet...
>Thanks
>Miguel
>Portugal
Author
11 May 2005 9:54 PM
Al Dunbar [MS-MVP]
"GIXER" <GI***@discussions.microsoft.com> wrote in message
news:2FE6BA63-EC72-4C4E-A789-EDA0EABCAA0A@microsoft.com...
> Hi,
> need help to make a script that do this:
> read an AD user's attribute and based on that attribute update other
> attibutes that are stored in a excel spreadsheet...
> Thanks
> Miguel
> Portugal

The full solution kind of depends on which attributes or which type of
attributes are involved, whether single-valued (description), multi-valued
(phone), or constrained (managedBy). Also depends on how the target user has
been specified (sAMAccountName or DN). Also depends on how the attributes
are stored in the spreadsheet. And, if group membership is considered an
attribute, that adds a whole 'nuther level of complexity.

/Al
Author
13 May 2005 1:16 PM
GIXER
Hum... yep.. the problem is that i don't unsderstand anything about scripting
except that is very usefull :) .. but i do know that the excel spreadsheet is
like this:

sAMAccountName,first field to update,second field to update
MIGUEL,PORTUGAL,LISBON
JOSE,SPAIN,MADRID

The field sAMAccountName already exist in AD and the a need to update the
other to fields... what i need the script do is simple:
read the sAMAccountName in the spreadsheet and make a relation with the same
field in AD and update the new fields of the witch user...


Show quote
"Al Dunbar  [MS-MVP]" wrote:

>
> "GIXER" <GI***@discussions.microsoft.com> wrote in message
> news:2FE6BA63-EC72-4C4E-A789-EDA0EABCAA0A@microsoft.com...
> > Hi,
> > need help to make a script that do this:
> > read an AD user's attribute and based on that attribute update other
> > attibutes that are stored in a excel spreadsheet...
> > Thanks
> > Miguel
> > Portugal
>
> The full solution kind of depends on which attributes or which type of
> attributes are involved, whether single-valued (description), multi-valued
> (phone), or constrained (managedBy). Also depends on how the target user has
> been specified (sAMAccountName or DN). Also depends on how the attributes
> are stored in the spreadsheet. And, if group membership is considered an
> attribute, that adds a whole 'nuther level of complexity.
>
> /Al
>
>
>
Author
14 May 2005 1:01 AM
Al Dunbar [MS-MVP]
You've got me there. Portugal and Lisbon are not active directory attributes
that I have ever heard of. I suppose these could be "country" and "city",
however, the description field could also be used for this info

/Al

Show quote
"GIXER" <GI***@discussions.microsoft.com> wrote in message
news:B53DAB36-F0AA-4E4C-843A-E70A3FDB5D5E@microsoft.com...
> Hum... yep.. the problem is that i don't unsderstand anything about
scripting
> except that is very usefull :) .. but i do know that the excel spreadsheet
is
> like this:
>
> sAMAccountName,first field to update,second field to update
> MIGUEL,PORTUGAL,LISBON
> JOSE,SPAIN,MADRID
>
> The field sAMAccountName already exist in AD and the a need to update the
> other to fields... what i need the script do is simple:
> read the sAMAccountName in the spreadsheet and make a relation with the
same
> field in AD and update the new fields of the witch user...
>
>
> "Al Dunbar  [MS-MVP]" wrote:
>
> >
> > "GIXER" <GI***@discussions.microsoft.com> wrote in message
> > news:2FE6BA63-EC72-4C4E-A789-EDA0EABCAA0A@microsoft.com...
> > > Hi,
> > > need help to make a script that do this:
> > > read an AD user's attribute and based on that attribute update other
> > > attibutes that are stored in a excel spreadsheet...
> > > Thanks
> > > Miguel
> > > Portugal
> >
> > The full solution kind of depends on which attributes or which type of
> > attributes are involved, whether single-valued (description),
multi-valued
> > (phone), or constrained (managedBy). Also depends on how the target user
has
> > been specified (sAMAccountName or DN). Also depends on how the
attributes
> > are stored in the spreadsheet. And, if group membership is considered an
> > attribute, that adds a whole 'nuther level of complexity.
> >
> > /Al
> >
> >
> >
Author
14 May 2005 8:44 AM
Corné Bogaarts
It seems to me, that most of these questions are answered in the links I
posted in a previous reply. It may look more scary than it actually is.

The ADSI scriptomatic will write the code for you to update the fields - just
copy and paste. The other links describe a script that will read the data from
an Excel-sheet and loop through it.
All that's left is some cutting and pasting

If you want to start learning about scripting, you could start here
(http://www.microsoft.com/technet/scriptcenter/guide/sas_vbs_ksyg.mspx) and
read about the introduction to 'Working with objects'. To get up to speed with
AD-scripting, you might wanna read this chapter
http://www.microsoft.com/technet/scriptcenter/guide/sas_usr_ipwb.mspx
(The rest of the book is equally usefull, but not necessarilly for your
current task.)

Show quote
On Fri, 13 May 2005 06:16:04 -0700, "GIXER" <GI***@discussions.microsoft.com>
wrote:

>Hum... yep.. the problem is that i don't unsderstand anything about scripting
>except that is very usefull :) .. but i do know that the excel spreadsheet is
>like this:
>
>sAMAccountName,first field to update,second field to update
>MIGUEL,PORTUGAL,LISBON
>JOSE,SPAIN,MADRID
>
>The field sAMAccountName already exist in AD and the a need to update the
>other to fields... what i need the script do is simple:
>read the sAMAccountName in the spreadsheet and make a relation with the same
>field in AD and update the new fields of the witch user...
>
>
>"Al Dunbar  [MS-MVP]" wrote:
>
>>
>> "GIXER" <GI***@discussions.microsoft.com> wrote in message
>> news:2FE6BA63-EC72-4C4E-A789-EDA0EABCAA0A@microsoft.com...
>> > Hi,
>> > need help to make a script that do this:
>> > read an AD user's attribute and based on that attribute update other
>> > attibutes that are stored in a excel spreadsheet...
>> > Thanks
>> > Miguel
>> > Portugal
>>
>> The full solution kind of depends on which attributes or which type of
>> attributes are involved, whether single-valued (description), multi-valued
>> (phone), or constrained (managedBy). Also depends on how the target user has
>> been specified (sAMAccountName or DN). Also depends on how the attributes
>> are stored in the spreadsheet. And, if group membership is considered an
>> attribute, that adds a whole 'nuther level of complexity.
>>
>> /Al
>>
>>
>>
Author
16 May 2005 11:26 AM
GIXER
Thanks, its very helpfull...

Show quote
"Corni Bogaarts" wrote:

> It seems to me, that most of these questions are answered in the links I
> posted in a previous reply. It may look more scary than it actually is.
>
> The ADSI scriptomatic will write the code for you to update the fields - just
> copy and paste. The other links describe a script that will read the data from
> an Excel-sheet and loop through it.
> All that's left is some cutting and pasting
>
> If you want to start learning about scripting, you could start here
> (http://www.microsoft.com/technet/scriptcenter/guide/sas_vbs_ksyg.mspx) and
> read about the introduction to 'Working with objects'. To get up to speed with
> AD-scripting, you might wanna read this chapter
> http://www.microsoft.com/technet/scriptcenter/guide/sas_usr_ipwb.mspx
> (The rest of the book is equally usefull, but not necessarilly for your
> current task.)
>
> On Fri, 13 May 2005 06:16:04 -0700, "GIXER" <GI***@discussions.microsoft.com>
> wrote:
>
> >Hum... yep.. the problem is that i don't unsderstand anything about scripting
> >except that is very usefull :) .. but i do know that the excel spreadsheet is
> >like this:
> >
> >sAMAccountName,first field to update,second field to update
> >MIGUEL,PORTUGAL,LISBON
> >JOSE,SPAIN,MADRID
> >
> >The field sAMAccountName already exist in AD and the a need to update the
> >other to fields... what i need the script do is simple:
> >read the sAMAccountName in the spreadsheet and make a relation with the same
> >field in AD and update the new fields of the witch user...
> >
> >
> >"Al Dunbar  [MS-MVP]" wrote:
> >
> >>
> >> "GIXER" <GI***@discussions.microsoft.com> wrote in message
> >> news:2FE6BA63-EC72-4C4E-A789-EDA0EABCAA0A@microsoft.com...
> >> > Hi,
> >> > need help to make a script that do this:
> >> > read an AD user's attribute and based on that attribute update other
> >> > attibutes that are stored in a excel spreadsheet...
> >> > Thanks
> >> > Miguel
> >> > Portugal
> >>
> >> The full solution kind of depends on which attributes or which type of
> >> attributes are involved, whether single-valued (description), multi-valued
> >> (phone), or constrained (managedBy). Also depends on how the target user has
> >> been specified (sAMAccountName or DN). Also depends on how the attributes
> >> are stored in the spreadsheet. And, if group membership is considered an
> >> attribute, that adds a whole 'nuther level of complexity.
> >>
> >> /Al
> >>
> >>
> >>
>
>

AddThis Social Bookmark Button