Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VBS - ADSI - Add Group to Group

Featured Replies

Anyone have a nice easy examlpe to add a group to another group?

I prefer this to be done in VBS as I already have around 100 lines of VBS doing other things and this is one of the last things I need.

The other big reason is I am passing an argument to the VBS that is sometimes in quotes and sometimes not. Its only in quotes when there is a space in it.

VBS treats this great, but if I was to try and do this on the command line it wouldnt work because the quotes come in as part of %1 and then get stuck in the middle of some text where they shouldnt be.

Example

NewCTXApp.cmd MyApp

the line I was trying in batch in the .cmd was:

net localgroup CTX-CMC-Admins CTX-%1-Admin /ADD /DOMAIN

This works great when there are no quotes

But if I run the same command with quotes and spaces...

NewCTXApp.cmd "My App"

then the line in question comes out as:

net localgroup CTX-CMC-Admins CTX-"My App"-Admin /ADD /DOMAIN

which obviously fails miserably.

Sooooo, if someone can hook me up with a short chunk of example code on adding a group to a group, that would be spectacular.

Why not use %* instead of %1 ?

It should take care of space problems.

Hi why you dont use : http://www.microsoft.com/technet/scriptcen...s/adgpvb03.mspx

Const ADS_PROPERTY_APPEND = 3

Set objGroup = GetObject _

("LDAP://cn=Sea-Users,cn=Users,dc=NA,dc=fabrikam,dc=com")

objGroup.PutEx ADS_PROPERTY_APPEND, "member", _

Array("cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com", _

"cn=Executives,ou=Management,dc=NA,dc=fabrikam,dc=com", _

"cn=MyerKen,ou=Management,dc=NA,dc=fabrikam,dc=com")

objGroup.SetInfo

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.