Re: Script that detects group membership

Tech-Archive recommends: Fix windows errors by optimizing your registry



Gidday,

I use the IFMember.exe from the Windows resourse kit and a DOS script.

Place the IFMember.exe in the \\server\netlogon share.

Example of script is:

REM
#############################################################################################
REM # IFMember shares
#
REM # These shares are mapped on AD Group Membership
#
REM
#############################################################################################

%logonserver%\netlogon\ifmember.exe "DOMAINNAME\AntiVirus"
if NOT ERRORLEVEL 1 goto admin
copy \\server3\vphome\GRC.dat c:"\Documents and Settings\All
Users\Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5"
CLS
goto admin

:admin
%logonserver%\netlogon\ifmember.exe "DOMAINNAME\Admin"
if NOT ERRORLEVEL 1 goto next
net use m: \\server1\c$
net use n: \\server1\d$
net use o: \\server2\C$
net use p: \\server2\e$
net use q: \\server2\f$
CLS
goto next

:next

"Josh" <Josh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:564CAAC0-6F13-42C9-AB7B-417C0CA8C5A6@xxxxxxxxxxxxxxxx
>I am looking for a script that detects whether or not a user in AD is a
> member of a group. If that use is a member of that group I want a file
> copy
> to begin. Is this possible?


.



Relevant Pages

  • Batch ntbackup to external hard drives (new version - Sept 2006)
    ... Below is a new version of the backup script that I posted to USENET ... Disk drives are usually more portable than tape drives, ... rem 1) Edit the Script Customizations ...
    (microsoft.public.windows.server.general)
  • automate dcpromo during nt4 pdc upgrade to W2k3 DC
    ... I am attempting to script the upgrade of a NT4 PDC to a W2K3 domain ... I have set the UnAttendMode to ... FullUnattended and the upgrade works perfectly up to the point where the ... @rem SetupMgrTag ...
    (microsoft.public.windows.server.migration)
  • Re: Deploying Office 07 with Group Policy
    ... Microsoft Online Partner Support ... Please disable the GPO. ... |> the following script to the Computer Startup Script. ... |> REM Environment customization begins here. ...
    (microsoft.public.office.setup)
  • Re: Office 2007 Std Group Policy Deployment Failing
    ... Here is the config.xml script ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ... When attempting to deploy the installation package via group policy, ...
    (microsoft.public.office.setup)
  • Re: Script to copy database
    ... database from a local computer to a network at a certain time everyday. ... Would this be done by writing a script and setting up a scheduled ... IMHO you dont need Python for that. ... REM LANCEMENT DE L'EXPORT DE LA BASE ADMINISTRATIVE EN MODE TACHE ...
    (comp.lang.python)