<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hey, Scripting Guy! How Can I Find All the Users with Remote Access Permissions?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/08/25/hey-scripting-guy-august-25-2005.aspx</link><description>Hey, Scripting Guy! How can I find all the users with remote access permissions; that is, all those with the Dial-In or VPN property set to Allow ? -- RC 
 
 Hey, RC. You know, it seems like people are always looking for something: true love, happiness</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Hey, Scripting Guy! How Can I Find All the Users with Remote Access Permissions?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/08/25/hey-scripting-guy-august-25-2005.aspx#3352878</link><pubDate>Tue, 31 Aug 2010 15:41:59 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3352878</guid><dc:creator>MPH</dc:creator><description>&lt;p&gt;Use this:&lt;/p&gt;
&lt;p&gt;On Error Resume Next&lt;/p&gt;
&lt;p&gt;Const ADS_SCOPE_SUBTREE = 2&lt;/p&gt;
&lt;p&gt;Set objConnection = CreateObject(&amp;quot;ADODB.Connection&amp;quot;)&lt;/p&gt;
&lt;p&gt;Set objCommand = &amp;nbsp; CreateObject(&amp;quot;ADODB.Command&amp;quot;)&lt;/p&gt;
&lt;p&gt;objConnection.Provider = &amp;quot;ADsDSOObject&amp;quot;&lt;/p&gt;
&lt;p&gt;objConnection.Open &amp;quot;Active Directory Provider&amp;quot;&lt;/p&gt;
&lt;p&gt;Set objCommand.ActiveConnection = objConnection&lt;/p&gt;
&lt;p&gt;objCommand.Properties(&amp;quot;Page Size&amp;quot;) = 1000&lt;/p&gt;
&lt;p&gt;objCommand.Properties(&amp;quot;Searchscope&amp;quot;) = ADS_SCOPE_SUBTREE &lt;/p&gt;
&lt;p&gt;objCommand.CommandText = _&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;quot;SELECT Name FROM &amp;#39;LDAP://dc=fabrikam,dc=com&amp;#39; WHERE objectCategory=&amp;#39;user&amp;#39;AND msNPAllowDialin = TRUE&amp;quot;&lt;/p&gt;
&lt;p&gt;Set objRecordSet = objCommand.Execute&lt;/p&gt;
&lt;p&gt;objRecordSet.MoveFirst&lt;/p&gt;
&lt;p&gt;Do Until objRecordSet.EOF&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Wscript.Echo objRecordSet.Fields(&amp;quot;Name&amp;quot;).Value&lt;/p&gt;
&lt;p&gt; &amp;nbsp;objRecordSet.MoveNext&lt;/p&gt;
&lt;p&gt;Loop&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3352878" width="1" height="1"&gt;</description></item><item><title>re: Hey, Scripting Guy! How Can I Find All the Users with Remote Access Permissions?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/08/25/hey-scripting-guy-august-25-2005.aspx#3344577</link><pubDate>Fri, 16 Jul 2010 07:44:26 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3344577</guid><dc:creator>N00b to script</dc:creator><description>&lt;p&gt;I couldn&amp;#39;t get this to work.just keep recieving errors.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3344577" width="1" height="1"&gt;</description></item></channel></rss>