<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michael Phillips Blog &#187; Active Directory</title>
	<atom:link href="http://nukeitmike.com/blog/tag/active-directory/feed" rel="self" type="application/rss+xml" />
	<link>http://nukeitmike.com/blog</link>
	<description>My place to speak about things</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:55:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using Powershell to get logon script path from Active Directory</title>
		<link>http://nukeitmike.com/blog/2010/07/29/using-powershell-to-get-logon-script-path-from-active-directory/</link>
		<comments>http://nukeitmike.com/blog/2010/07/29/using-powershell-to-get-logon-script-path-from-active-directory/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 20:57:31 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nukeitmike.com/blog/2010/07/29/using-powershell-to-get-logon-script-path-from-active-directory/</guid>
		<description><![CDATA[If you want to know what logon script users are getting, this is an easy way to get that information: Import-Module -Name ActiveDirectory Get-ADUser -Filter * -SearchBase &#34;OU=YourOUName,DC=YourDomain,DC=COM&#34; -properties ScriptPath &#124; Export-Csv &#34;c:\script\ADUser.csv&#34; Note: In order for this to work, you have to have the ActiveDirectory Module loaded.&#160;]]></description>
			<content:encoded><![CDATA[<p>If you want to know what logon script users are getting, this is an easy way to get that information:</p>
<blockquote><p>Import-Module -Name ActiveDirectory </p>
<p>Get-ADUser -Filter * -SearchBase &quot;OU=YourOUName,DC=YourDomain,DC=COM&quot; -properties ScriptPath | Export-Csv &quot;c:\script\ADUser.csv&quot;</p>
</blockquote>
<p>Note: In order for this to work, you have to have the ActiveDirectory Module loaded.&#160; </p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2010/07/29/using-powershell-to-get-logon-script-path-from-active-directory//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Servers in Domain</title>
		<link>http://nukeitmike.com/blog/2010/02/24/servers-in-domain/</link>
		<comments>http://nukeitmike.com/blog/2010/02/24/servers-in-domain/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:24:25 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nukeitmike.com/blog/2010/02/24/servers-in-domain-2/</guid>
		<description><![CDATA[At some point, I had a desire to list all the computer accounts for any server OS in Active Directory.  I am pretty sure that I did a search and found the script below, but I don’t remember where, so whoever wrote it doesn’t get credit this time… $strCategory = &#8220;computer&#8221; $strOperatingSystem = &#8220;Windows*Server*&#8221; $objDomain [...]]]></description>
			<content:encoded><![CDATA[<p>At some point, I had a desire to list all the computer accounts for any server OS in Active Directory.  I am pretty sure that I did a search and found the script below, but I don’t remember where, so whoever wrote it doesn’t get credit this time…</p>
<blockquote><p>$strCategory = &#8220;computer&#8221;<br />
$strOperatingSystem = &#8220;Windows*Server*&#8221;</p>
<p>$objDomain = New-Object System.DirectoryServices.DirectoryEntry</p>
<p>$objSearcher = New-Object System.DirectoryServices.DirectorySearcher<br />
$objSearcher.SearchRoot = $objDomain</p>
<p>$objSearcher.Filter = (&#8220;OperatingSystem=$strOperatingSystem&#8221;)</p>
<p>$colProplist = &#8220;name&#8221;<br />
foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}</p>
<p>$colResults = $objSearcher.FindAll()<br />
Write-Host $colResults.count<br />
foreach ($objResult in $colResults)<br />
    {<br />
    $objComputer = $objResult.Properties;<br />
    $objComputer.name<br />
    }</p></blockquote>
<p>If you change the $strOperatingSystem = “Windows*Server*” to something like $strOperatingSystem = “Windows*”  it will return all computer accounts that have “Windows” in the Name field on the Operating System tab of the properties of the AD object:</p>
<p><a href="http://nukeitmike.com/blog/wp-content/uploads/2010/02/image.png"><img title="image" src="http://nukeitmike.com/blog/wp-content/uploads/2010/02/image_thumb.png" border="0" alt="image" width="644" height="263" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2010/02/24/servers-in-domain//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

