+ Post New Thread
Results 1 to 4 of 4
Windows Server 2008 R2 Thread, poweshell to modify dial-in tab in Technical; Im looking to set the dial-in tab of all the objects in a specific OU to Enable.. Is there a ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200

    poweshell to modify dial-in tab

    Im looking to set the dial-in tab of all the objects in a specific OU to Enable.. Is there a way i can do this in bulk? Perhaps by powershell? Cheers

  2. #2


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,630
    Thank Post
    250
    Thanked 2,909 Times in 2,141 Posts
    Rep Power
    829
    If you install Quest's PowerShell AD cmdlets you could do the following using a combination of Get-QADUser and Set-QADUser...

    Code:
    # Load the Quest Snap-in
    Add-PSSnapin Quest.ActiveRoles.ADManagement
    
    # Modify remote access permissions for all users in "example" OU
    Get-QADUser -SearchRoot 'domain.internal/example' -SizeLimit 0 | Set-QADUser -ObjectAttributes @{msNPAllowDialin=$true}
    
    # Source
    # http://www.powergui.org/thread.jspa?messageID=46028
    I also came across the following VBScript...

    Code:
    Dim aConnection, aCommand, aResult, strLDAPPath, user, objUser
    strLDAPPath = InputBox("Please enter the LDAP path of the OU:")
    Set aConnection = CreateObject("ADODB.Connection")
    Set aCommand = CreateObject("ADODB.Command")
    aConnection.Provider = "ADsDSOObject"
    aConnection.Open
    aCommand.ActiveConnection = aConnection
    aCommand.CommandText="<LDAP://" & strLDAPPath & ">;(&(objectCategory=Person)(objectClass=User));distinguishedName;subTree"
    Set aResult = aCommand.Execute()
    Do While Not aResult.EOF
            strDN = aResult.Fields("distinguishedName") 
            WScript.Echo strDN
            Set objUser = GetObject("LDAP://" & strDN)
            objUser.Put "msNPAllowDialin", TRUE
            objUser.SetInfo
            aResult.MoveNext
    Loop
    Last edited by Arthur; 7th January 2011 at 09:50 AM.

  3. Thanks to Arthur from:

    RabbieBurns (8th January 2011)

  4. #3

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    The latter vbs worked perfectly. However I had to click OK for every item it changed which was a bit tedious.. but it worked fine.. cheers

  5. #4

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    115
    re. the OKs, if you/whoever needs to run it in future, then delete the WScript.Echo line within the while loop.

  6. 2 Thanks to PiqueABoo:

    Arthur (11th January 2011), RabbieBurns (11th January 2011)



SHARE:
+ Post New Thread

Similar Threads

  1. Dial-up on an ADSL enabled line
    By AngryTechnician in forum Internet Related/Filtering/Firewall
    Replies: 4
    Last Post: 10th November 2010, 05:38 PM
  2. Dial-in options in Active Directory
    By mcowley in forum Windows
    Replies: 4
    Last Post: 29th January 2008, 01:18 AM
  3. weird dial up modem problem
    By Uraken in forum Hardware
    Replies: 4
    Last Post: 24th January 2008, 11:50 PM
  4. BT Dial up Speed At Home.
    By tickmike in forum General Chat
    Replies: 10
    Last Post: 15th August 2007, 11:56 PM
  5. disable dial up
    By adnan in forum Windows
    Replies: 15
    Last Post: 28th March 2007, 12:02 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •