<?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/"
	>

<channel>
	<title>prijon.net</title>
	<atom:link href="http://www.prijon.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.prijon.net</link>
	<description>Taj's technical blog</description>
	<pubDate>Sat, 30 Jul 2011 23:13:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create a self signed - code signing certificate</title>
		<link>http://www.prijon.net/?p=12</link>
		<comments>http://www.prijon.net/?p=12#comments</comments>
		<pubDate>Wed, 06 Feb 2008 20:19:20 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.prijon.net/?p=12</guid>
		<description><![CDATA[Using &#8220;makecert.exe&#8221;, whic is a part of Windows SDK, or download it here.
This tool is suitable for testing purposes only!
To create the root certificate:
Open Windows SDK CMD Shell (or Command Prompt and go to the makecert.exe location)
Run this command
makecert -n &#8220;CN=PowerShell Root Certificate&#8221; -a sha1 -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer -ss Root -len 1024 [...]]]></description>
			<content:encoded><![CDATA[<p>Using &#8220;makecert.exe&#8221;, whic is a part of Windows SDK, or <a href="http://www.prijon.net/wp-content/uploads/2008/01/makecert.zip" title="Makecert tool">download it here</a>.<br />
<em>This tool is suitable for testing purposes only!</em></p>
<p><strong>To create the root certificate</strong><strong>:</strong><br />
Open Windows SDK CMD Shell (or Command Prompt and go to the makecert.exe location)<br />
Run this command<br />
<strong><em>makecert -n &#8220;CN=PowerShell Root Certificate&#8221; -a sha1 -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer -ss Root -len 1024 -sr localMachine</em></strong></p>
<p><strong>To create a user certificate</strong> (with the private key):<br />
Open Windows SDK CMD Shell (or Command Prompt and go to the makecert.exe location)<br />
Run this command</p>
<p><strong><em>makecert -pe -n &#8220;CN=PowerShell User Certificate&#8221; -ss MY -a sha1 -eku 1.3.6.1.5.5.7.3.3 -iv root.pvk -ic root.cer</em></strong></p>
<p><em>Note that the number 1.3.6.1.5.5.7.3.3 indicates that a certificate can be used for code signing.</em></p>
<p align="left"><em>More info for Makecert:  <a href="http://msdn2.microsoft.com/en-us/library/aa386968(VS.85).aspx">http://msdn2.microsoft.com/en-us/library/aa386968(VS.85).aspx</a></em></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prijon.net/?feed=rss2&amp;p=12</wfw:commentRss>
		</item>
		<item>
		<title>Execute a Powershell script on Windows Vista</title>
		<link>http://www.prijon.net/?p=9</link>
		<comments>http://www.prijon.net/?p=9#comments</comments>
		<pubDate>Thu, 24 Jan 2008 21:37:20 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.prijon.net/?p=9</guid>
		<description><![CDATA[script.ps1 is not digitally signed. The script will not execute  on the system. Please see &#8220;get-help about_signing&#8221; for more details.
To solve the problem, you can just change the Execution policy to &#8220;RemoteSigned&#8221; with the folowing command (as Administrator):
Set-ExecutionPolicy RemoteSigned   -   Note that this option is not recomanded!
The more secure way is to digitaly sign the [...]]]></description>
			<content:encoded><![CDATA[<p>script.ps1 is not digitally signed. The script will not execute  on the system. Please see &#8220;get-help about_signing&#8221; for more details.</p>
<p>To solve the problem, you can just change the Execution policy to &#8220;RemoteSigned&#8221; with the folowing command (as Administrator):<br />
<em><strong>Set-ExecutionPolicy RemoteSigned   -   </strong>Note that this option is not recomanded!</em></p>
<p>The more secure way is to digitaly sign the script.</p>
<ol>
<li>Navigate to the location of your <strong><a href="http://www.prijon.net/?p=12" title="Create a code signing certificate">code signing certificate</a></strong> (like &#8220;Set-Location<em> cert:\CurrentUser\my\</em>&#8221; for Personal certificates).</li>
<li>Type <strong><em>Get-CilldItem </em></strong>to get a list of all certificates in thihs location and copy the Thumbprint of the right certificate.</li>
<li>Set the &#8221;$cert&#8221; with the certificate location:</li>
</ol>
<p align="left"><strong><em>$cert = Get-Childitem -Path cert:\CurrentUser\My\A4309AD8067D6AC70E36B578A890A1EFC3FB -CodeSigningCert</em></strong></p>
<p align="left">    4.    Now with the folowing command digitaly sign the file<br />
            (ex.: Powershell profile)</p>
<p align="left"><strong><em>Set-AuthenticodeSignature -FilePath C:\&#8230;\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -cert $cert<br />
</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prijon.net/?feed=rss2&amp;p=9</wfw:commentRss>
		</item>
		<item>
		<title>Create a Powershell profile</title>
		<link>http://www.prijon.net/?p=7</link>
		<comments>http://www.prijon.net/?p=7#comments</comments>
		<pubDate>Thu, 24 Jan 2008 20:45:15 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.prijon.net/?p=7</guid>
		<description><![CDATA[ If you want that Powershell remember your aliases (and other commands) like &#8220;gh for Get-Help&#8221;,
you can create a Powershell profile script, which is automaticali executed at Powershell startup

First test if a profile exist with the folowing command:
test-path $profile

If the resulte is false, use the folowing command to create a new profile
new-item -path $profile -itemtype [...]]]></description>
			<content:encoded><![CDATA[<p> If you want that Powershell remember your aliases (and other commands) like &#8220;gh for Get-Help&#8221;,<br />
you can create a Powershell profile script, which is automaticali executed at Powershell startup</p>
<ol>
<li>First test if a profile exist with the folowing command:<br />
<strong><em>test-path $profile<br />
</em></strong></li>
<li>If the resulte is false, use the folowing command to create a new profile<br />
<em><strong>new-item -path $profile -itemtype file -force<br />
</strong></em></li>
<li>Type <strong><em>notepad $profile</em></strong> to edit the pprofile</li>
<li>Now you can write down all yours commands (ex. Set-Alias gh Get-Help)<br />
<img src="http://www.prijon.net/wp-content/uploads/2008/01/powershell-profile.jpg" /><img src="http://www.prijon.net/wp-content/uploads/2008/01/powershell-profile.thumbnail.jpg%22%20mce_src=%22http://www.prijon.net/wp-content/uploads/2008/01/powershell-profile.jpg%22%3E%3Cimg%20src=" alt="Powershell Profile" align="left" border="0" height="1" width="1" /></li>
</ol>
<p>To view the location of the profile script type <strong><em>$profile</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prijon.net/?feed=rss2&amp;p=7</wfw:commentRss>
		</item>
	</channel>
</rss>

