[wpkg-users] AD -> WPKG xml files
simon.begin at institutsmq.qc.ca
simon.begin at institutsmq.qc.ca
Wed Nov 11 14:16:05 CET 2009
Finally, I've programmed it, using Windows cmd-line tools like DSQuery:
Here's how:
-----
dsquery group OU=chrg,DC=CHRG,DC=(...) -name "G WPKG*" > ad-wpkg-1.txt
del ad-wpkg-2.txt
for /f "tokens=*" %%i in (ad-wpkg-1.txt) do dsget group %%i -members >>
ad-wpkg-2.txt
------
This creates 2 files looking like this:
1st one has all group names starting with "G WPKG":
----------
"CN=G WPKG Test2,OU=Computers,OU=CHRG,DC=..."
"CN=G WPKG tstpkg,OU=Computers,OU=CHRG,DC=..."
------
The Second file has members of respective groups:
------------
"CN=pc97199,OU=Computers,OU=CHRG,DC=..."
"CN=IT-TEST7,OU=Computers,OU=CHRG,DC=..."
"CN=PC98045,OU=Computers,OU=CHRG Admin,DC=..."
"CN=IT-TEST7,OU=Computers,OU=CHRG,DC=..."
"CN=PC98045,OU=Computers,OU=CHRG Admin,DC=..."
---------------
Next a script to "sort" this and put it into a special section of
hosts.xml
--------
<!-- Section imported from AD Groups - DO NOT MODIFY -->
<!-- AD-WPKG BEGIN -->
<host name="IT-TEST7" profile-id="defaut" >
<profile-id="G_WPKG_Test2" />
<profile-id="G_WPKG_tstpkg" />
</host>
<host name="pc97199" profile-id="defaut" >
<profile-id="G_WPKG_Test2" />
</host>
<host name="PC98045" profile-id="defaut" >
<profile-id="G_WPKG_Test2" />
<profile-id="G_WPKG_tstpkg" />
</host>
<!-- AD-WPKG END -->
------------
Note that I add the "default" profile to all users, this one contains
default applications every PC has installed.
This script I can share, however as I am no JS expert, it's done in
xHarbour for now (xBase compiler)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20091111/3e1ace85/attachment-0002.html>
More information about the wpkg-users
mailing list