**************************************************************************
Copyright (c) SAPIEN Technologies, Inc. All rights reserved
This file is part of the PrimalScript 2007 Code Samples.
File: AddtoGroup.wsf
Comments:
Disclaimer: This source code is intended only as a supplement to
SAPIEN Development Tools and/or on-line documentation.
See these other materials for detailed information
regarding SAPIEN code samples.
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
**************************************************************************
AddtoGroup.wsf
*****************************************************************************
USAGE: Cscript AddtoGroup.wsf /S:server /G:Localgroup /A:GrouptoAdd
This script will add the specified user or group to the specified local group
on a remote PC. It is assumed you already have administrator rights on the
remote system. You can use this script to remotely add other users or groups
to the local Administrators group, or any other group for that matter. The
group must already exist.
If you are specifying a domain user or group you must use the format
domainname/accountname and if the group has spaces, it must be contained with
quotes "".
cscript AddtoGroup.wsf /? will display this help message.
Examples:
cscript AddtoGroup.wsf /S:server /G:Localgroup /A:NewGroupToAdd
cscript AddtoGroup.wsf /S:XPPC01 /G:Administrators /A:"mydom/domain admins"