<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwizguide.com/rss_namespace/">
 <channel>
  <title>ScriptingAnswers.com Forums</title>
  <link>http://www.scriptinganswers.com/forum2/</link>
  <description>This is an XML content feed of; ScriptingAnswers.com Forums : Last 10 Posts</description>
  <pubDate>Fri, 21 Nov 2008 04:55:51 +0000</pubDate>
  <lastBuildDate>Thu, 20 Nov 2008 13:10:41 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.0</generator>
  <ttl>30</ttl>
  <WebWizForums:feedURL>www.scriptinganswers.com/forum2/RSS_topic_feed.asp</WebWizForums:feedURL>
  <image>
   <title>ScriptingAnswers.com Forums</title>
   <url>http://www.scriptinganswers.com/forum2/forum_images/web_wiz_forums.png</url>
   <link>http://www.scriptinganswers.com/forum2/</link>
  </image>
  <item>
   <title>VBScript : AD Query - Multiple Domains/specific OUs</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12914#12914</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=3359" rel="nofollow">jhicks</a><br /><strong>Subject:</strong> AD Query - Multiple Domains/specific OUs<br /><strong>Posted:</strong> 20 Nov 2008 at 13:10<br /><br />Instead of &lt;LDAP://my.domain.com&gt; use<br>&lt;LDAP://domaincontroller/OU=Foo,DC=my,DC=domain,DC=com&gt;<br>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 13:10:41 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12914#12914</guid>
  </item> 
  <item>
   <title>VBScript : AD Query - Multiple Domains/specific OUs</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12913#12913</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=26270" rel="nofollow">ajgtx</a><br /><strong>Subject:</strong> AD Query - Multiple Domains/specific OUs<br /><strong>Posted:</strong> 20 Nov 2008 at 13:07<br /><br /><P>My code <EM>d&#140;s</EM> work with this as the query string: <a href="" target="_blank">;(&amp;(objectCategory=computer)(objectClass=*)(CN=*));distinguishedName,pwdLastSet,name;subtree">&lt; L D A P://my.domain.com&gt;;(&amp;(objectCategory=computer)(objectClass=*)(CN=*));distinguishedName,pwdLastSet,name;subtree</A>&nbsp;&gt;<BR><BR>But I need to specify the OU in which I want to query for computer objects. </P><span style="font-size:10px"><br /><br />Edited by ajgtx - Yesterday at 13:11</span>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 13:07:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12913#12913</guid>
  </item> 
  <item>
   <title>VBScript : AD Query - Multiple Domains/specific OUs</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12912#12912</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=3359" rel="nofollow">jhicks</a><br /><strong>Subject:</strong> AD Query - Multiple Domains/specific OUs<br /><strong>Posted:</strong> 20 Nov 2008 at 12:26<br /><br />But it should if you used my code example.&nbsp; D&#140;s the account you're using have the right permissions?&nbsp; Do you want to post another script for us to test?]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 12:26:48 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12912#12912</guid>
  </item> 
  <item>
   <title>VBScript : runtime error:  Type mismatch on AD Description</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12911#12911</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=7557" rel="nofollow">epoh97</a><br /><strong>Subject:</strong> runtime error:  Type mismatch on AD Description<br /><strong>Posted:</strong> 20 Nov 2008 at 12:20<br /><br />Cool, that worked.<br><br>So tmpArray(0) is a one-line array is that correct?<br>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 12:20:06 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12911#12911</guid>
  </item> 
  <item>
   <title>VBScript : AD Query - Multiple Domains/specific OUs</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12910#12910</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=26270" rel="nofollow">ajgtx</a><br /><strong>Subject:</strong> AD Query - Multiple Domains/specific OUs<br /><strong>Posted:</strong> 20 Nov 2008 at 11:49<br /><br />I was wrong, this didn't work. I had launched one of my other scripts that d&#140;sn't query a specific OU. I can pull all objects of a certain kind from a domain no problem, but I can't pull all objects from a specific OU using a specific username/password. No worries on the security issue, the script will be asking for a username and password to use across multiple domains.]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 11:49:28 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2401&amp;PID=12910#12910</guid>
  </item> 
  <item>
   <title>VBScript : runtime error:  Type mismatch on AD Description</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12909#12909</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=3359" rel="nofollow">jhicks</a><br /><strong>Subject:</strong> runtime error:  Type mismatch on AD Description<br /><strong>Posted:</strong> 20 Nov 2008 at 08:34<br /><br /><br>This should work a little bit better for you:<br><br>&nbsp;&nbsp;&nbsp; struserAccountControl = objRecordSet.Fields("userAccountControl").value<br>&nbsp;&nbsp;&nbsp; strUsers = objRecordSet.Fields("Name").value<br>&nbsp;&nbsp;&nbsp; If IsArray(objRecordSet.Fields("description").Value) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpArray=objRecordSet.Fields("description")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strDescription =&nbsp; tmpArray(0)<br>&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; strDescription=""<br>&nbsp;&nbsp;&nbsp; End If<br><br>don't forget to dim tmpArray.<br>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 08:34:52 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12909#12909</guid>
  </item> 
  <item>
   <title>VBScript : runtime error:  Type mismatch on AD Description</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12908#12908</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=7557" rel="nofollow">epoh97</a><br /><strong>Subject:</strong> runtime error:  Type mismatch on AD Description<br /><strong>Posted:</strong> 20 Nov 2008 at 07:45<br /><br />Thanks, I will try it. As a junior scripter Arrays aren't my thing.]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 07:45:30 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12908#12908</guid>
  </item> 
  <item>
   <title>VBScript : runtime error:  Type mismatch on AD Description</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12907#12907</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=3359" rel="nofollow">jhicks</a><br /><strong>Subject:</strong> runtime error:  Type mismatch on AD Description<br /><strong>Posted:</strong> 20 Nov 2008 at 06:48<br /><br />Description is often seen as an array.<br><br>Try using objRecordSet.Fields("description")(0)<br><br>I think I have that right, but it's off the top of my head so you may need to play with the syntax.<br>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 06:48:20 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12907#12907</guid>
  </item> 
  <item>
   <title>VBScript : runtime error:  Type mismatch on AD Description</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12906#12906</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=7557" rel="nofollow">epoh97</a><br /><strong>Subject:</strong> runtime error:  Type mismatch on AD Description<br /><strong>Posted:</strong> 20 Nov 2008 at 06:40<br /><br />Hello all:<br><br>I have this little script trying to output the description (Active Directory) of disabled users only.<br><br>When I run the script it says there is a mismatch.<br><br><table width="99%"><tr><td><pre class="BBcode"><br><font color="#0000ff">Option Explicit<br><br>Dim objConnection, objCommand, objRecordSet<br>Dim struserAccountControl<br>Dim strUsers, strDescription<br><br><br><br>Const ADS_SCOPE_SUBTREE = 2<br><br>Set objConnection = CreateObject("ADODB.Connection")<br>Set objCommand =&nbsp;&nbsp; CreateObject("ADODB.Command")<br>objConnection.Provider = "ADsDSOObject"<br>objConnection.Open "Active Directory Provider"<br>Set objCommand.ActiveConnection = objConnection<br><br>objCommand.Properties("Page Size") = 1000<br>objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE <br>objCommand.Properties("Sort on") = "sn"<br><br>objCommand.CommandText = _<br>&nbsp;&nbsp;&nbsp; "SELECT Name, employeeID, userAccountControl, description FROM 'LDAP://dc=mydomain,dc=com' WHERE " _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp; "objectCategory='user'"&nbsp; <br>Set objRecordSet = objCommand.Execute<br>objRecordSet.MoveFirst<br><br><br>Do Until objRecordSet.EOF<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; struserAccountControl = objRecordSet.Fields("userAccountControl").value<br>&nbsp;&nbsp;&nbsp; strUsers = objRecordSet.Fields("Name").value<br>&nbsp;&nbsp;&nbsp; strDescription = objRecordSet.Fields("description").Value<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Select Case strUsers<br>&nbsp;&nbsp;&nbsp; Case "Backup"<br>&nbsp;&nbsp;&nbsp; Case "krbtgt"<br>&nbsp;&nbsp;&nbsp; Case "ASPNET"<br>&nbsp;&nbsp;&nbsp; Case "Guest"<br>&nbsp;&nbsp;&nbsp;&nbsp; Case Else<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Select Case struserAccountControl<br>&nbsp;&nbsp;&nbsp; Case 512<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; struserAccountControl = ""<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; WScript.Echo objRecordSet.Fields("Name").Value<br>&nbsp;&nbsp;&nbsp; Case 514<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; struserAccountControl = "disabled"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; WScript.Echo objRecordSet.Fields("Name").Value &amp; "(" &amp; strDescription &amp; ")"<br>&nbsp;&nbsp;&nbsp; Case Else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; WScript.Echo objRecordSet.Fields("Name").Value<br>&nbsp;&nbsp;&nbsp; End Select<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Set struserAccountControl = Nothing<br>&nbsp;&nbsp;&nbsp; Set strUsers = Nothing<br>&nbsp;&nbsp;&nbsp; Set strDescription = Nothing<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; End Select<br>&nbsp;&nbsp;&nbsp; objRecordSet.MoveNext<br><br>Loop</font><br><br></pre></td></tr></table><br><br>This line is the problem: <table width="99%"><tr><td><pre class="BBcode"><font color="#0000ff">WScript.Echo objRecordSet.Fields("Name").Value &amp; "(" &amp; strDescription &amp; ")"<font color="#000000"></pre></td></tr></table><br><br>Thanks</font><br></font>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 06:40:19 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2414&amp;PID=12906#12906</guid>
  </item> 
  <item>
   <title>VBScript : Appending a Date in JScript</title>
   <link>http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2413&amp;PID=12905#12905</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.scriptinganswers.com/forum2/member_profile.asp?PF=3359" rel="nofollow">jhicks</a><br /><strong>Subject:</strong> Appending a Date in JScript<br /><strong>Posted:</strong> 20 Nov 2008 at 06:23<br /><br />The VBScript error is because you can't dim and define a variable on the same line:<br><br>dim ndate=replace(dt,"/","_");<br><br>That's causing the error.&nbsp; You need this:<br><br>Dim ndate<br>ndate=replace(dt,"/","_")<br><br>And is this what you're after?<br><br>&nbsp;WshShell.sendkeys(" file='end_cmpak_" + ndate +"'")<br><br>If the + symbol gives you errors then try the &amp; character.<br><span style="font-size:10px"><br /><br />Edited by jhicks - Yesterday at 06:23</span>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 06:23:06 +0000</pubDate>
   <guid isPermaLink="true">http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=2413&amp;PID=12905#12905</guid>
  </item> 
 </channel>
</rss>