<?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>PowerShell.nu &#187; Windows 7</title>
	<atom:link href="http://www.powershell.nu/tag/windows-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.powershell.nu</link>
	<description></description>
	<lastBuildDate>Wed, 14 Jul 2010 22:17:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Joining a Windows 7 Client to a Domain through PowerShell</title>
		<link>http://www.powershell.nu/2009/06/05/joining-a-windows-7-client-to-a-domain-through-powershell/</link>
		<comments>http://www.powershell.nu/2009/06/05/joining-a-windows-7-client-to-a-domain-through-powershell/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 17:02:49 +0000</pubDate>
		<dc:creator>Niklas Goude</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.powershell.nu/?p=754</guid>
		<description><![CDATA[Time to join a Windows 7 client to a domain. Now that the Test Domain is up and running ( Check Previous Posts ), we can start joining clients to the domain. Since it&#8217;s a freshly installed Windows 7 client, we dont have to bother about userprofiles and so on.. we&#8217;ll save that for later [...]]]></description>
			<content:encoded><![CDATA[<p>Time to join a Windows 7 client to a domain. Now that the Test Domain is up and running ( <a href="http://www.powershell.nu/2009/04/11/part-00-migrate-from-windows-server-2003-to-windows-server-2008-r2-and-windows-7-using-powershell/">Check Previous Posts</a> ), we can start joining clients to the domain.</p>
<p />
Since it&#8217;s a freshly installed Windows 7 client, we dont have to bother about userprofiles and so on.. we&#8217;ll save that for later <img src='http://www.powershell.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p />
Joining the domain is done through WMI. Just create a new Object containing the Win32_ComputerSystem WMI object and call the JoinDOmainOrWorkGroup() method.</p>
<p />
<pre>
<strong>
function JoinDomain ([string]$Domain, [string]$User, [string]$Password ) {

	$DomainUser = $Domain + "\" + $User
	$OU = $null

	$ComputerSystem = gwmi Win32_ComputerSystem

	$ComputerSystem.JoinDomainOrWorkGroup(
		$Domain,
		$Password,
		$DomainUser,
		$OU,
		3
	)
}
</strong>
</pre>
<p />
Here&#8217;s an example on running the function.</p>
<p />
<pre>
<strong>
PS > JoinDomain PowerShell.nu migaccount Password1
</strong>
</pre>
<p />
And voila! the client shuts down and on Startup, It&#8217;ll have joined the new domain.</p>
<p />
]]></content:encoded>
			<wfw:commentRss>http://www.powershell.nu/2009/06/05/joining-a-windows-7-client-to-a-domain-through-powershell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Write-StickyNote</title>
		<link>http://www.powershell.nu/2009/06/05/write-stickynote/</link>
		<comments>http://www.powershell.nu/2009/06/05/write-stickynote/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 16:30:03 +0000</pubDate>
		<dc:creator>Niklas Goude</dc:creator>
				<category><![CDATA[COM Object]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.powershell.nu/?p=741</guid>
		<description><![CDATA[Here&#8217;s a fun script that uses the new &#8220;Sticky Notes&#8221; in WIndows 7. The script is based on a simple function that uses the SendKeys() method through the Wscript.Shell COM object. This is a nice example on how you can handle COM objects through PowerShell. I&#8217;ve also included an if statement that checks if StickyNotes [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a fun script that uses the new &#8220;Sticky Notes&#8221; in WIndows 7.</p>
<p />
The script is based on a simple function that uses the SendKeys() method through the Wscript.Shell COM object. This is a nice example on how you can handle COM objects through PowerShell.</p>
<p />
I&#8217;ve also included an if statement that checks if StickyNotes is active. If that&#8217;s the case, the text will be started in a new StickyNotes.. note..</p>
<p />
Anyway, here&#8217;s the function.</p>
<pre>
<strong>
function Write-StickyNote ([string]$Text) {

	if (gps | Where { $_.ProcessName -match "stikynot" }) {

		$StickyNote = $True
	}

	$Wscript = New-Object -Com Wscript.Shell
	[void]$Wscript.Run("stikynot.exe")
	start-sleep 1

	if ($StickyNote -eq $True) {

		$Wscript.SendKeys("^n")
	}

	$Wscript.SendKeys($Text)
}
</strong>
</pre>
<p>And here&#8217;s an example on running the function.</p>
<p />
<pre>
<strong>
PS > .\Write-StickyNote.ps1 "Hello from PowerShell.nu"
</strong>
</pre>
<p />
<a href="http://www.powershell.nu/wp-content/uploads/2009/06/stickynotes01.jpg"><img src="http://www.powershell.nu/wp-content/uploads/2009/06/stickynotes01.jpg" alt="stickynotes01" title="stickynotes01" width="201" height="183" class="alignnone size-full wp-image-742" /></a></p>
<p />
<a href="http://www.powershell.nu/wp-content/uploads/2009/06/write-stickynote.ps1">Click here to download the Script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.powershell.nu/2009/06/05/write-stickynote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrate From Windows Server 2003 to Windows Server 2008 R2 and Windows 7 Using PowerShell</title>
		<link>http://www.powershell.nu/2009/04/11/part-00-migrate-from-windows-server-2003-to-windows-server-2008-r2-and-windows-7-using-powershell/</link>
		<comments>http://www.powershell.nu/2009/04/11/part-00-migrate-from-windows-server-2003-to-windows-server-2008-r2-and-windows-7-using-powershell/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 20:21:54 +0000</pubDate>
		<dc:creator>Niklas Goude</dc:creator>
				<category><![CDATA[Active-Directory]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Server 2008 R2]]></category>

		<guid isPermaLink="false">http://www.powershell.nu/?p=597</guid>
		<description><![CDATA[Windows 7 and Windows Server 2008 R2 are just around the Corner. Beta Versions are very promising and, as it seems, the best OS that Microsoft has ever done! This is something that&#8217;s not easy to accomplish in the Beta stage of an OS, but Microsoft has pulled it off! The comparisons that I&#8217;ve made [...]]]></description>
			<content:encoded><![CDATA[<p>Windows 7 and Windows Server 2008 R2 are just around the Corner. Beta Versions are very promising and, as it seems, the best OS that Microsoft has ever done! This is something that&#8217;s not easy to accomplish in the Beta stage of an OS, but Microsoft has pulled it off! The comparisons that I&#8217;ve made with previous Operating Systems are entirely based on self observations.</p>
<p />
I&#8217;m hoping that alot of people share my enthusiasm regarding the Windows 7 technologies and I would like to share my Beta tests with the Microsoft Community. I&#8217;m aware that a few commands and techniques may vary from the final Release so the following posts might not be accurate when the final build of Windows 7 / 2008 R2  are released. I will try to keep these posts up to date and follow Microsfts development of Windows 7 and Windows Server 2008 R2.</p>
<p />
<h3>Scenraio</h3>
<p />
You have a Windows 2003 Active-Directory Environment that you want to Updgrade / migrate to a Windows 2008 R2 environment. Microsoft have a great tool called <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ae279d01-7dca-413c-a9d2-b42dfb746059&#038;displaylang=en=">ADMT (Active Directory Migration Tool)</a> which allows you to perform the appropriate steps when migration from Windows 2003 to Windows 2008. But since this is a PowerShell Blog, I&#8217;m going to show examples on doing all these steps through PowerShell. I&#8217;m planning on showing the following steps:</p>
<p />
<strong>Windows 2003</strong></p>
<ul>
<li><a href="http://www.powershell.nu/2009/04/11/part-10-scripting-up-an-active-directory-test-environment-through-powershell/">Scripting up a Active-Directory Test Environment through PowerShell</a></li>
<li><a href="http://www.powershell.nu/2009/04/13/part-11-adding-ou-structure-using-powershell/">Adding Ou Structure using Powershell</a></li>
<li><a href="http://www.powershell.nu/2009/04/13/part-112-adding-users-through-powershell/">Adding Users through PowerShell</a></li>
<li><a href="http://www.powershell.nu/2009/04/13/part-113-adding-computers-through-powershell/">Adding Computers through PowerShell</a></li>
<li><a href="http://www.powershell.nu/2009/04/15/part-114-adding-groups-through-powershell/">Adding Groups Through PowerShell</a></li>
<li><a href="http://www.powershell.nu/2009/04/16/part-115-adding-group-membership-through-powershell/">Adding Group Membership Through PowerShell</a></li>
<li><a href="http://www.powershell.nu/2009/04/27/part-116-adding-homefolder-through-powershell/">Adding HomeFolder Through PowerShell</a></li>
<li><a href="http://www.powershell.nu/2009/06/05/joining-a-windows-7-client-to-a-domain-through-powershell/">Joining a Windows 7 Client to a Domain through PowerShell</a></li>
</ul>
<p />
<strong>Windows 2008 R2</strong></p>
<ul>
<li>Gathering information from a 2003 Active Directory Domain through PowerShell</li>
<li>Migarting OU Structure to a Active-Directory 2008 R2 Server Through PowerShell</li>
<li>Migarting Users to a Active-Directory 2008 R2 Server Through PowerShell</li>
<li>Migarting Computers to a Active-Directory 2008 R2 Server Through PowerShell</li>
<li>Migarting Groups to a Active-Directory 2008 R2 Server Through PowerShell</li>
<li>Migarting Group Membership to a Active-Directory 2008 R2 Server Through PowerShell</li>
<li>Migrating HomeFolders to a Active-Directory 2008 R2 Server Through PowerShell</li>
<li>Migrating a Windows 7 Client to a Active-Directory 2008 R2 Server Through PowerShell</li>
<p></lu></p>
<p />
Note that all steps are built from a test environment and may require slight adjustments to fit your environmnent.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.powershell.nu/2009/04/11/part-00-migrate-from-windows-server-2003-to-windows-server-2008-r2-and-windows-7-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
