Solved

vbscript for pulling the AD attribute in Dial-in tab for users in AD

Posted on 2008-06-25
15
2,508 Views
Last Modified: 2009-09-08
Hi,

Can you please help me with the script for pulling the AD attribute in Dial-in Tab in AD for all the enabled accounts.

Can we not include inbuilt account, disabled accounts and other system accounts?

I want all the three remote access policy attribute for all the users output to an excel sheet with the current setting for the users and update the attribute to a particulate setting for all the users in the same excel sheet?

regards
Chandru
0
Comment
Question by:chandru_sol
15 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 21871813
Hi, this allows you to enable the dial-in access....I'll have to look further for retrieving the other properties...

http://support.microsoft.com/kb/252398

Regards,

Rob.
0
 
LVL 12

Author Comment

by:chandru_sol
ID: 21871834
Hi Rob,

Can you help me with retrieving the attribute information to an excel file and then we can work on the other part of the script?

regards
Chandru
0
 
LVL 12

Author Comment

by:chandru_sol
ID: 21896666
Hi Rob,

Can you please help me with the script?

regards
Chandru
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21896853
Hey, I found the settings here:

List the Dial-In Property Configuration Settings for a User Account
http://www.windowsmanagement.net/scripting/wmi/activedirectory/user/retrieving/#ListDail-in.htm

This will show you the settings for your account.....do you need help to iterate that through all users?

Rob.
If LCase(Right(Wscript.FullName, 11)) = "wscript.exe" Then

    strPath = Wscript.ScriptFullName

    strCommand = "%comspec% /k cscript  """ & strPath & """"

    Set objShell = CreateObject("Wscript.Shell")

    objShell.Run(strCommand), 1, True

    Wscript.Quit

End If
 

' List the Dial-In Property Configuration Settings for a User Account

' http://www.windowsmanagement.net/scripting/wmi/activedirectory/user/retrieving/#ListDail-in.htm
 

On Error Resume Next
 

Const E_ADS_PROPERTY_NOT_FOUND  = &h8000500D
 

Const FourthOctet = 1

Const ThirdOctet = 256

Const SecondOctet = 65536

Const FirstOctet = 16777216
 

Set objADSysInfo = CreateObject("ADSystemInfo")
 

Set objUser = GetObject("LDAP://" & objADSysInfo.Username)
 

WScript.Echo "Dial-In settings for " & objUser.adsPath & VbCrLf
 

blnMsNPAllowDialin = objUser.Get("msNPAllowDialin")

WScript.Echo "Remote Access Permission (Dial-in or VPN)"

If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

    WScript.Echo "Control access through Remote Access Policy"

    Err.Clear

Else

    If blnMsNPAllowDialin = True Then

        WScript.Echo "Allow access (msNPAllowDialin)"

    Else

        WScript.Echo "Deny access (msNPAllowDialin)"

    End If

End If

WScript.Echo 

 

arrMsNPSavedCallingStationID = objUser.GetEx("msNPSavedCallingStationID")

If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

    WScript.Echo "No Caller-ID specified."

    Err.Clear

Else

    WScript.Echo "Verify Caller ID (msNPSavedCallingStationID): "

    For Each strValue in arrMsNPSavedCallingStationID

        WScript.echo strValue

    Next

  

    objUser.GetEx "msNPCallingStationID"

    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

        WScript.Echo "Calling station ID(s) specified but not assigned."

        Err.Clear

    Else

        WScript.echo "Calling station ID(s) assigned."

    End If

  

End If

WScript.Echo 

 

intMsRADIUSServiceType = objUser.Get("msRADIUSServiceType")

WScript.Echo "Callback Options"

If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

    WScript.Echo "No Callback"

    Err.Clear

Else

    strMsRADIUSCallbackNumber = objUser.Get("msRADIUSCallbackNumber")

    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

        WScript.Echo "Set by caller (Routing and Remote Access Service only)"

        Err.Clear

  

    strMsRASSavedCallbackNumber = objUser.Get("msRASSavedCallbackNumber")

    If Err.Number <> E_ADS_PROPERTY_NOT_FOUND Then

        WScript.Echo "Unused value of " & strMsRASSavedCallbackNumber & _

            " appears in the Always Callback to field."

    Else

        Err.Clear

    End If  

Else

    WScript.Echo "Always Callback to: " & _

        strMsRADIUSCallbackNumber & " (msRADIUSCallbackNumber)"

    End If

End If   

WScript.Echo

 

intMsRASSavedFramedIPAddress = objUser.Get("msRASSavedFramedIPAddress")

If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

    WScript.Echo "No static IP address assigned."

    Err.Clear

Else

    If sgn(intMsRASSavedFramedIPAddress) = -1 Then

        intIP = intMsRASSavedFramedIPAddress

        WScript.StdOut.Write 256 + (int(intIP/FirstOctet)) & "."

        intFirstRemainder = intIP mod FirstOctet

        WScript.StdOut.Write 256 + (int(intFirstRemainder/SecondOctet)) & "."

        intSecondRemainder = intFirstRemainder mod SecondOctet

        WScript.StdOut.Write 256 + (int(intSecondRemainder/ThirdOctet)) & "."

        intThirdRemainder = intSecondRemainder mod ThirdOctet

        WScript.Echo 256 + (int(intThirdRemainder/FourthOctet))

    Else

        intIP = intMsRASSavedFramedIPAddress

        WScript.StdOut.Write  int(intIP/FirstOctet) & "."

        intFirstRemainder = intIP mod FirstOctet

        WScript.StdOut.Write  int(intFirstRemainder/SecondOctet) & "."

        intSecondRemainder = intFirstRemainder mod SecondOctet

        WScript.StdOut.Write  int(intSecondRemainder/ThirdOctet) & "."

        intThirdRemainder = intSecondRemainder mod ThirdOctet

        WScript.Echo int(intThirdRemainder/FourthOctet)

    End If

    

    objUser.Get "msRADIUSFramedIPAddress"

    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

        WScript.Echo "Static IP address specified but not assigned."

        Err.Clear

    Else

        WScript.Echo "Static IP Address assigned."

    End If

 

End If

WScript.Echo 

 

arrMsRASSavedFramedRoute = objUser.GetEx("msRASSavedFramedRoute")

If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

    WScript.Echo "No static Routes specified."

    Err.Clear

Else

    WScript.echo "Static Routes (msRASSavedFramedRoute):"

    WScript.Echo vbTab & "CIDR 0.0.0.0 Metric"

    For Each strValue in arrMsRASSavedFramedRoute

        WScript.echo vbTab & strValue

    Next

  

    objUser.GetEx "msRADIUSFramedRoute"

    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

        WScript.Echo "Static Routes specified but not assigned."

        Err.Clear

    Else

        WScript.echo "Static Routes assigned."

    End If

End If

Open in new window

0
 
LVL 12

Author Comment

by:chandru_sol
ID: 21896890
Yes please.

Can you please help me with all the users and only enabled accounts?

regards
Chandru
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21897245
Ok, this should do it, but obviously, the output needs to be fixed.....I'll try to do some sort of CSV output hopefully tomorrow....

Rob.
If LCase(Right(Wscript.FullName, 11)) = "wscript.exe" Then

    strPath = Wscript.ScriptFullName

    strCommand = "%comspec% /k cscript  """ & strPath & """"

    Set objShell = CreateObject("Wscript.Shell")

    objShell.Run(strCommand), 1, True

    Wscript.Quit

End If
 

Set objConnection = CreateObject("ADODB.Connection")

Set objCommand =   CreateObject("ADODB.Command")

objConnection.Provider = "ADsDSOObject"

objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection
 

objCommand.Properties("Page Size") = 1000

Set objRootDSE = GetObject("LDAP://RootDSE")
 

objCommand.CommandText = _

    "<LDAP://" & objRootDSE.Get("defaultNamingContext") & ">;(&(objectClass=Person)(objectCategory=User)" & _

        "(!userAccountControl:1.2.840.113556.1.4.803:=2));adsPath;Subtree"  

Set objRecordSet = objCommand.Execute
 

On Error Resume Next
 

objRecordSet.MoveFirst

Do Until objRecordSet.EOF

	Set objUser = GetObject(objRecordSet.Fields("adsPath").Value)

	

	WScript.Echo "Dial-In settings for " & objUser.adsPath & VbCrLf

	

	blnMsNPAllowDialin = objUser.Get("msNPAllowDialin")

	WScript.Echo "Remote Access Permission (Dial-in or VPN)"

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "Control access through Remote Access Policy"

	    Err.Clear

	Else

	    If blnMsNPAllowDialin = True Then

	        WScript.Echo "Allow access (msNPAllowDialin)"

	    Else

	        WScript.Echo "Deny access (msNPAllowDialin)"

	    End If

	End If

	WScript.Echo 

	 

	arrMsNPSavedCallingStationID = objUser.GetEx("msNPSavedCallingStationID")

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No Caller-ID specified."

	    Err.Clear

	Else

	    WScript.Echo "Verify Caller ID (msNPSavedCallingStationID): "

	    For Each strValue in arrMsNPSavedCallingStationID

	        WScript.echo strValue

	    Next

	  

	    objUser.GetEx "msNPCallingStationID"

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Calling station ID(s) specified but not assigned."

	        Err.Clear

	    Else

	        WScript.echo "Calling station ID(s) assigned."

	    End If

	  

	End If

	WScript.Echo 

	 

	intMsRADIUSServiceType = objUser.Get("msRADIUSServiceType")

	WScript.Echo "Callback Options"

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No Callback"

	    Err.Clear

	Else

	    strMsRADIUSCallbackNumber = objUser.Get("msRADIUSCallbackNumber")

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Set by caller (Routing and Remote Access Service only)"

	        Err.Clear

	  

	    strMsRASSavedCallbackNumber = objUser.Get("msRASSavedCallbackNumber")

	    If Err.Number <> E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Unused value of " & strMsRASSavedCallbackNumber & _

	            " appears in the Always Callback to field."

	    Else

	        Err.Clear

	    End If  

	Else

	    WScript.Echo "Always Callback to: " & _

	        strMsRADIUSCallbackNumber & " (msRADIUSCallbackNumber)"

	    End If

	End If   

	WScript.Echo

	 

	intMsRASSavedFramedIPAddress = objUser.Get("msRASSavedFramedIPAddress")

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No static IP address assigned."

	    Err.Clear

	Else

	    If sgn(intMsRASSavedFramedIPAddress) = -1 Then

	        intIP = intMsRASSavedFramedIPAddress

	        WScript.StdOut.Write 256 + (int(intIP/FirstOctet)) & "."

	        intFirstRemainder = intIP mod FirstOctet

	        WScript.StdOut.Write 256 + (int(intFirstRemainder/SecondOctet)) & "."

	        intSecondRemainder = intFirstRemainder mod SecondOctet

	        WScript.StdOut.Write 256 + (int(intSecondRemainder/ThirdOctet)) & "."

	        intThirdRemainder = intSecondRemainder mod ThirdOctet

	        WScript.Echo 256 + (int(intThirdRemainder/FourthOctet))

	    Else

	        intIP = intMsRASSavedFramedIPAddress

	        WScript.StdOut.Write  int(intIP/FirstOctet) & "."

	        intFirstRemainder = intIP mod FirstOctet

	        WScript.StdOut.Write  int(intFirstRemainder/SecondOctet) & "."

	        intSecondRemainder = intFirstRemainder mod SecondOctet

	        WScript.StdOut.Write  int(intSecondRemainder/ThirdOctet) & "."

	        intThirdRemainder = intSecondRemainder mod ThirdOctet

	        WScript.Echo int(intThirdRemainder/FourthOctet)

	    End If

	    

	    objUser.Get "msRADIUSFramedIPAddress"

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Static IP address specified but not assigned."

	        Err.Clear

	    Else

	        WScript.Echo "Static IP Address assigned."

	    End If

	 

	End If

	WScript.Echo 

	 

	arrMsRASSavedFramedRoute = objUser.GetEx("msRASSavedFramedRoute")

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No static Routes specified."

	    Err.Clear

	Else

	    WScript.echo "Static Routes (msRASSavedFramedRoute):"

	    WScript.Echo vbTab & "CIDR 0.0.0.0 Metric"

	    For Each strValue in arrMsRASSavedFramedRoute

	        WScript.echo vbTab & strValue

	    Next

	  

	    objUser.GetEx "msRADIUSFramedRoute"

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Static Routes specified but not assigned."

	        Err.Clear

	    Else

	        WScript.echo "Static Routes assigned."

	    End If

	End If

    objRecordSet.MoveNext

Loop

Open in new window

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 12

Author Comment

by:chandru_sol
ID: 21897386
Thanks Rob!!
0
 
LVL 12

Author Comment

by:chandru_sol
ID: 21904922
Hi Rob,

Any luck with this

regards
Chandru
0
 
LVL 12

Author Comment

by:chandru_sol
ID: 21923723
Hi Rob,

Can you help me with the CSV file output?

regards
Chandru
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21961208
Hi Chandru, I will get to this soon....I have been absolutely flat out this week.....

Rob.
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 22177096
Hi Chandru....terribly sorry that it's been so long......my output it all the same, because I don't these settings configured, so see if this works for you....

Regards,

Rob.
If LCase(Right(Wscript.FullName, 11)) = "wscript.exe" Then

    strPath = Wscript.ScriptFullName

    strCommand = "%comspec% /k cscript  """ & strPath & """"

    Set objShell = CreateObject("Wscript.Shell")

    objShell.Run(strCommand), 1, True

    Wscript.Quit

End If

 

Set objConnection = CreateObject("ADODB.Connection")

Set objCommand =   CreateObject("ADODB.Command")

objConnection.Provider = "ADsDSOObject"

objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection

 

objCommand.Properties("Page Size") = 1000

Set objRootDSE = GetObject("LDAP://RootDSE")

 

objCommand.CommandText = _

    "<LDAP://" & objRootDSE.Get("defaultNamingContext") & ">;(&(objectClass=Person)(objectCategory=User)" & _

        "(!userAccountControl:1.2.840.113556.1.4.803:=2));adsPath;Subtree"  

Set objRecordSet = objCommand.Execute

 

On Error Resume Next
 

strResults =	"""" & "Remote Access Permission (Dial-in or VPN)" & """" & _

				",""" & "msNPSavedCallingStationID" & """" & _

				",""" & "msNPCallingStationID" & """" & _

				",""" & "Callback Options" & """" & _

				",""" & "msRASSavedFramedIPAddress" & """" & _

				",""" & "msRADIUSFramedIPAddress" & """" & _

				",""" & "msRASSavedFramedRoute" & """" & _

				",""" & "msRADIUSFramedRoute" & """"
 

objRecordSet.MoveFirst

Do Until objRecordSet.EOF

	Set objUser = GetObject(objRecordSet.Fields("adsPath").Value)

	

	WScript.Echo "Dial-In settings for " & objUser.adsPath & VbCrLf

	

	blnMsNPAllowDialin = objUser.Get("msNPAllowDialin")

	WScript.Echo "Remote Access Permission (Dial-in or VPN)"

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "Control access through Remote Access Policy"

	    strResults = strResults & VbCrLf & """Control access through Remote Access Policy"""

	    Err.Clear

	Else

	    If blnMsNPAllowDialin = True Then

	        WScript.Echo "Allow access (msNPAllowDialin)"

	        strResults = strResults & VbCrLf & """Allow access (msNPAllowDialin)"""

	    Else

	        WScript.Echo "Deny access (msNPAllowDialin)"

	        strResults = strResults & VbCrLf & """Allow access (msNPAllowDialin)"""

	    End If

	End If

	 

	arrMsNPSavedCallingStationID = objUser.GetEx("msNPSavedCallingStationID")

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No Caller-ID specified."

	    strResults = strResults & ",""No Caller-ID specified."","""""

	    Err.Clear

	Else

	    WScript.Echo "Verify Caller ID (msNPSavedCallingStationID): "

	    strData = ""

	    For Each strValue in arrMsNPSavedCallingStationID

	        If strData = "" Then

	        	strData = strValue

	        Else

	        	strData = strData & ", " & strValue

	        End If

	        WScript.echo strValue

	    Next

	    strResults = strResults & ",""Verify Caller ID (msNPSavedCallingStationID): " & strData & """"

	  

	    objUser.GetEx "msNPCallingStationID"

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Calling station ID(s) specified but not assigned."

	        strResults = strResults & ",""Calling station ID(s) specified but not assigned."""

	        Err.Clear

	    Else

	        WScript.echo "Calling station ID(s) assigned."

	        strResults = strResults & ",""Calling station ID(s) assigned."""

	    End If

	  

	End If

	WScript.Echo

	 

	intMsRADIUSServiceType = objUser.Get("msRADIUSServiceType")

	WScript.Echo "Callback Options"

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No Callback"

	    strResults = strResults & ",""No Callback"""

	    Err.Clear

	Else

	    strMsRADIUSCallbackNumber = objUser.Get("msRADIUSCallbackNumber")

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Set by caller (Routing and Remote Access Service only)"

	        strResults = strResults & ",""Set by caller (Routing and Remote Access Service only)"

	        Err.Clear

	  

	    	strMsRASSavedCallbackNumber = objUser.Get("msRASSavedCallbackNumber")

	    	If Err.Number <> E_ADS_PROPERTY_NOT_FOUND Then

		        WScript.Echo "Unused value of " & strMsRASSavedCallbackNumber & _

	            	" appears in the Always Callback to field."

	            strResults = strResults & " - Unused value of " & strMsRASSavedCallbackNumber & _

	            	" appears in the Always Callback to field."""

	    	Else

		        Err.Clear

		        strResults = strResults & """"

	    	End If  

		Else

		    WScript.Echo "Always Callback to: " & _

	        	strMsRADIUSCallbackNumber & " (msRADIUSCallbackNumber)"

	        strResults = strResults & ",""Always Callback to: " & _

	        	strMsRADIUSCallbackNumber & " (msRADIUSCallbackNumber)"""

	    End If

	End If   

	WScript.Echo

	 

	intMsRASSavedFramedIPAddress = objUser.Get("msRASSavedFramedIPAddress")

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No static IP address assigned."

	    strResults = strResults & ",""No static IP address assigned."","""""

	    Err.Clear

	Else

	    If sgn(intMsRASSavedFramedIPAddress) = -1 Then

	        intIP = intMsRASSavedFramedIPAddress

	        WScript.StdOut.Write 256 + (int(intIP/FirstOctet)) & "."

	        strIP = 256 + (int(intIP/FirstOctet)) & "."

	        intFirstRemainder = intIP mod FirstOctet

	        WScript.StdOut.Write 256 + (int(intFirstRemainder/SecondOctet)) & "."

	        strIP = strIP & 256 + (int(intFirstRemainder/SecondOctet)) & "."

	        intSecondRemainder = intFirstRemainder mod SecondOctet

	        WScript.StdOut.Write 256 + (int(intSecondRemainder/ThirdOctet)) & "."

	        strIP = strIP & 256 + (int(intSecondRemainder/ThirdOctet)) & "."

	        intThirdRemainder = intSecondRemainder mod ThirdOctet

	        WScript.Echo 256 + (int(intThirdRemainder/FourthOctet))

	        strIP = strIP & 256 + (int(intThirdRemainder/FourthOctet))

	        strResults = strResults & ",""" & strIP & """"

	    Else

	        intIP = intMsRASSavedFramedIPAddress

	        WScript.StdOut.Write  int(intIP/FirstOctet) & "."

	        strIP = int(intIP/FirstOctet) & "."

	        intFirstRemainder = intIP mod FirstOctet

	        WScript.StdOut.Write  int(intFirstRemainder/SecondOctet) & "."

	        strIP = strIP & int(intFirstRemainder/SecondOctet) & "."

	        intSecondRemainder = intFirstRemainder mod SecondOctet

	        WScript.StdOut.Write  int(intSecondRemainder/ThirdOctet) & "."

	        strIP = strIP & int(intSecondRemainder/ThirdOctet) & "."

	        intThirdRemainder = intSecondRemainder mod ThirdOctet

	        WScript.Echo int(intThirdRemainder/FourthOctet)

	        strIP = strIP & int(intThirdRemainder/FourthOctet)

	        strResults = strResults & ",""" & strIP & """"

	    End If

	    

	    objUser.Get "msRADIUSFramedIPAddress"

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Static IP address specified but not assigned."

	        strResults = strResults & ",""Static IP address specified but not assigned."""

	        Err.Clear

	    Else

	        WScript.Echo "Static IP Address assigned."

	        strResults = strResults & ",""Static IP Address assigned."""

	    End If

	 

	End If

	WScript.Echo 

	 

	arrMsRASSavedFramedRoute = objUser.GetEx("msRASSavedFramedRoute")

	If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	    WScript.Echo "No static Routes specified."

	    strResults = strResults & ",""No static Routes specified."","""""

	    Err.Clear

	Else

	    WScript.echo "Static Routes (msRASSavedFramedRoute):"

	    WScript.Echo vbTab & "CIDR 0.0.0.0 Metric"

	    strData = ""

	    For Each strValue in arrMsRASSavedFramedRoute

	        WScript.echo vbTab & strValue

	        If strData = "" Then

	        	strData = strValue

	        Else

	        	strData = strData & ", " & strValue

	        End If

	    Next

	    strResults = strResults & ",""Static Routes (msRASSavedFramedRoute): CIDR 0.0.0.0 Metric - " & strData & """"

	  

	    objUser.GetEx "msRADIUSFramedRoute"

	    If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then

	        WScript.Echo "Static Routes specified but not assigned."

	        strResults = strResults & ",""Static Routes specified but not assigned."""

	        Err.Clear

	    Else

	        WScript.echo "Static Routes assigned."

	        strResults = strResults & ",""Static Routes assigned."""

	    End If

	End If

    objRecordSet.MoveNext

Loop
 

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objCSVFile = objFSO.CreateTextFile("RAS_Settings.csv", True)

objCSVFile.Write strResults

objCSVFile.Close

Set objCSVFile = Nothing
 

MsgBox "Done"

Open in new window

0
 

Expert Comment

by:Detroit99
ID: 24280475
not to bring up a dead article. however, this does NOT work, it outputs all the settings, but NOT the username assocated with each setting, seems kind of pointless.
0
 

Expert Comment

by:cullyk
ID: 25279628
That is incorrect. the username is there on the line "Dial-In settings for LDAP://CN="USERNAME!!"
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jquery-like closest property in Microsoft Word? 6 36
how to pick files up from ftp via script 8 49
Recursive folder search vbscript 7 39
Need to Modify a Script I found 5 92
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now