PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.win.server.scripting > for loop on this
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
for loop on this

Réponse
 
LinkBack Outils de la discussion
Vieux 01/10/2008, 07h36   #1
joey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut for loop on this

How do i change this script to use a loop

On Error Resume Next

Set objUser = GetObject _
("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
objUser.Put "KeyValueString", "bbb"
objUser.SetInfo

Set objUser = GetObject _
("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
objUser.Put "KeyValueString", "bbb"
objUser.SetInfo




  Réponse avec citation
Vieux 01/10/2008, 08h58   #2
Pegasus \(MVP\)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: for loop on this


"joey" <joe@abc.com> wrote in message
news:OD0Qve4IJHA.3548@TK2MSFTNGP05.phx.gbl...
> How do i change this script to use a loop
>
> On Error Resume Next
>
> Set objUser = GetObject _
>
> ("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
> objUser.Put "KeyValueString", "bbb"
> objUser.SetInfo
>
> Set objUser = GetObject _
>
> ("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
> objUser.Put "KeyValueString", "bbb"
> objUser.SetInfo


You need to tell us what your loop condition is. Do you want to run it
twice? Until a certain condition is met? Until an error is encountered?
Other?


  Réponse avec citation
Vieux 01/10/2008, 16h01   #3
joey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: for loop on this

No the loop is to modify attibutes in ADAM. The attribute keystring modifies
different "KEYS" in ADAM
"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
news:uyt0fM5IJHA.4896@TK2MSFTNGP04.phx.gbl...
>
> "joey" <joe@abc.com> wrote in message
> news:OD0Qve4IJHA.3548@TK2MSFTNGP05.phx.gbl...
>> How do i change this script to use a loop
>>
>> On Error Resume Next
>>
>> Set objUser = GetObject _
>>
>> ("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>> objUser.Put "KeyValueString", "bbb"
>> objUser.SetInfo
>>
>> Set objUser = GetObject _
>>
>> ("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>> objUser.Put "KeyValueString", "bbb"
>> objUser.SetInfo

>
> You need to tell us what your loop condition is. Do you want to run it
> twice? Until a certain condition is met? Until an error is encountered?
> Other?
>



  Réponse avec citation
Vieux 01/10/2008, 18h54   #4
Richard Mueller [MVP]
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: for loop on this

You might get ideas from the Microsoft Script Center section on scripting
ADAM:

http://www.microsoft.com/technet/scr...m/default.mspx

There are scripts that enumerate all attributes of ADAM objects (and their
values). For example:

http://www.microsoft.com/technet/scr.../amlsvb07.mspx

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"joey" <joe@abc.com> wrote in message
news:OnKeR58IJHA.5872@TK2MSFTNGP04.phx.gbl...
> No the loop is to modify attibutes in ADAM. The attribute keystring
> modifies different "KEYS" in ADAM
> "Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
> news:uyt0fM5IJHA.4896@TK2MSFTNGP04.phx.gbl...
>>
>> "joey" <joe@abc.com> wrote in message
>> news:OD0Qve4IJHA.3548@TK2MSFTNGP05.phx.gbl...
>>> How do i change this script to use a loop
>>>
>>> On Error Resume Next
>>>
>>> Set objUser = GetObject _
>>>
>>> ("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>>> objUser.Put "KeyValueString", "bbb"
>>> objUser.SetInfo
>>>
>>> Set objUser = GetObject _
>>>
>>> ("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>>> objUser.Put "KeyValueString", "bbb"
>>> objUser.SetInfo

>>
>> You need to tell us what your loop condition is. Do you want to run it
>> twice? Until a certain condition is met? Until an error is encountered?
>> Other?
>>

>
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h18.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12256 seconds with 12 queries