Re: dsmod utility
From: Jerold Schulman (Jerry_at_jsiinc.com)
Date: 08/06/04
- Next message: Jerold Schulman: "Re: remote system information"
- Previous message: Torgeir Bakken \(MVP\): "Re: Script to copy file to unique file name"
- In reply to: Jeff: "dsmod utility"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 06 Aug 2004 10:42:11 -0400
On Thu, 5 Aug 2004 13:35:26 -0700, "Jeff" <anonymous@discussions.microsoft.com>
wrote:
>I need to find a way to script the dsmod utility to
>automatically remove users from certain groups on logon.
>Everything works except that this utility requires the
>full distinguished name of the user. How can I capture
>this and pass it to the utility?
See tip 7335 in the 'Tips & Tricks' at http://www.jsiinc.com
set DN=N
for /f "Tokens=*" %%u in ('dsquery user -samid %username%') do (
set dn=%%u
)
if "%DN%" EQU "N" goto error
%DN% contains the distinguished name.
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
- Next message: Jerold Schulman: "Re: remote system information"
- Previous message: Torgeir Bakken \(MVP\): "Re: Script to copy file to unique file name"
- In reply to: Jeff: "dsmod utility"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|