<?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>Isaac&#039;s Blog &#187; get-content</title>
	<atom:link href="http://blog.isaacblum.com/tag/get-content/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.isaacblum.com</link>
	<description>So Many Rambles So Little Time....</description>
	<lastBuildDate>Wed, 28 Dec 2011 21:10:03 +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>To get and store the credential for the current user</title>
		<link>http://blog.isaacblum.com/2010/02/18/to-get-and-store-the-credential-for-the-current-user/</link>
		<comments>http://blog.isaacblum.com/2010/02/18/to-get-and-store-the-credential-for-the-current-user/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:11:09 +0000</pubDate>
		<dc:creator>IsaacBlum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[-AsSecureString]]></category>
		<category><![CDATA[ConvertTo-SecureString]]></category>
		<category><![CDATA[get-content]]></category>
		<category><![CDATA[new-object]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=300</guid>
		<description><![CDATA[Thank sean. 1 2 $notespw = Read-Host &#34;Enter the password for the Notes ID file&#34; -AsSecureString $notespw &#124; ConvertFrom-SecureString &#124; Set-Content $pwfile -force To retrieve the password and create the PSCredential object: 1 2 $notespw = get-content $pwfile &#124; ConvertTo-SecureString $notesid = new-object -typename system.management.automation.pscredential -argumentlist &#34;-default-&#34;,$notespw Example of use: 1 Get-DominoMailbox mary@contoso.com -SourceCredential $notesid]]></description>
			<content:encoded><![CDATA[<p><a href="http://diginomicon.net/">Thank sean.</a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$notespw</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Read-Host</span> <span style="color: #800000;">&quot;Enter the password for the Notes ID file&quot;</span> <span style="color: #008080; font-style: italic;">-AsSecureString</span>
<span style="color: #800080;">$notespw</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ConvertFrom-SecureString</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Set-Content</span> <span style="color: #800080;">$pwfile</span> <span style="color: #008080; font-style: italic;">-force</span></pre></td></tr></table></div>

<p>To retrieve the password and create the PSCredential object:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$notespw</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">get-content</span> <span style="color: #800080;">$pwfile</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ConvertTo-SecureString</span>
<span style="color: #800080;">$notesid</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">new-object</span> <span style="color: #008080; font-style: italic;">-typename</span> system.management.automation.pscredential <span style="color: #008080; font-style: italic;">-argumentlist</span> <span style="color: #800000;">&quot;-default-&quot;</span><span style="color: pink;">,</span>$notespw</pre></td></tr></table></div>

<p>Example of use:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;">Get<span style="color: pink;">-</span>DominoMailbox mary<span style="color: pink;">@</span>contoso.com <span style="color: pink;">-</span>SourceCredential $notesid</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/18/to-get-and-store-the-credential-for-the-current-user/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

