<?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>Thomas Maurer (tm) &#187; convert</title>
	<atom:link href="http://www.thomasmaurer.ch/tag/convert/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thomasmaurer.ch</link>
	<description>Just another private cloud weblog</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:10:45 +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>Powershell: Convert String to Scriptblock</title>
		<link>http://www.thomasmaurer.ch/2011/11/powershell-convert-string-to-scriptblock/</link>
		<comments>http://www.thomasmaurer.ch/2011/11/powershell-convert-string-to-scriptblock/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 16:49:03 +0000</pubDate>
		<dc:creator>Thomas Maurer</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[Convert String to Scriptblock]]></category>
		<category><![CDATA[Invoke-Command]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[Scriptblock]]></category>
		<category><![CDATA[String]]></category>

		<guid isPermaLink="false">http://www.thomasmaurer.ch/?p=2836</guid>
		<description><![CDATA[If you use PowerShell remoting in some scripts you will se you cannot use a string to send it with the Invoke-Command cmdlet. So you can simple convert a String to a Scriptblock  $scriptBlock = [Scriptblock]::Create($string) Now here an example &#8230; <a href="http://www.thomasmaurer.ch/2011/11/powershell-convert-string-to-scriptblock/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script><g:plusone size='small' href='http://www.thomasmaurer.ch/2011/11/powershell-convert-string-to-scriptblock/'></g:plusone></div><div class='dd_button'><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.thomasmaurer.ch/2011/11/powershell-convert-string-to-scriptblock/" data-count="horizontal" data-text="Powershell: Convert String to Scriptblock" data-via="thomasmaurer" ></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class='dd_button'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.thomasmaurer.ch%2F2011%2F11%2Fpowershell-convert-string-to-scriptblock%2F&amp;locale=en_US&amp;layout=button_count&amp;action=like&amp;width=92&amp;height=20&amp;colorscheme=light' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:92px; height:20px;' allowTransparency='true'></iframe></div></div><div style='clear:both'></div></div><div style='clear:both'></div><p><a href="http://www.thomasmaurer.ch/2011/01/run-remote-powershell-commands-on-multiple-standalone-computers/" title="Run Remote Powershell Commands on multiple standalone Computers" target="_blank"></a>If you use PowerShell remoting in some scripts you will se you cannot use a string to send it with the Invoke-Command cmdlet.</p>
<p>So you can simple convert a String to a Scriptblock</p>
<pre> $scriptBlock = [Scriptblock]::Create($string) </pre>
<p>Now here an example</p>
<pre>$remoteCommand =
@"
Import-Module ActiveDirectory
New-ADOrganizationalUnit -name
"@

$scriptBlock = [Scriptblock]::Create($remoteCommand)

Invoke-Command -ComputerName AD01 -ScriptBlock $scriptBlock
</pre>
<p>Basically you could create a function for that.</p>
<pre>
function ConvertTo-Scriptblock  {
&lt;#
 Function to Convert a String into a Script Block
#&gt;
	Param(
        [Parameter(
            Mandatory = $true,
            ParameterSetName = &#039;&#039;,
            ValueFromPipeline = $true)]
            [string]$string
        )
       $scriptBlock = [scriptblock]::Create($string)
       return $scriptBlock
}</pre>
<!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com --><div class="shr-publisher-2836"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thomasmaurer.ch/2011/11/powershell-convert-string-to-scriptblock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Word Documents to PDF with Automator</title>
		<link>http://www.thomasmaurer.ch/2010/08/convert-word-documents-to-pdf-with-automator/</link>
		<comments>http://www.thomasmaurer.ch/2010/08/convert-word-documents-to-pdf-with-automator/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 17:04:23 +0000</pubDate>
		<dc:creator>Thomas Maurer</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[KTSI]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[.doc]]></category>
		<category><![CDATA[.pdf]]></category>
		<category><![CDATA[Automator]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[finder]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Portable Document Format]]></category>
		<category><![CDATA[Word]]></category>
		<category><![CDATA[Word Documents]]></category>

		<guid isPermaLink="false">http://www.thomasmaurer.ch/?p=965</guid>
		<description><![CDATA[I got a lot of Microsoft Word Documents form one of our professors at KTSI. But Evernote only supports text recognition inside PDFs. So I converted all Word Documents to PDF with the Mac OS X Automator. How to convert Word &#8230; <a href="http://www.thomasmaurer.ch/2010/08/convert-word-documents-to-pdf-with-automator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script><g:plusone size='small' href='http://www.thomasmaurer.ch/2010/08/convert-word-documents-to-pdf-with-automator/'></g:plusone></div><div class='dd_button'><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.thomasmaurer.ch/2010/08/convert-word-documents-to-pdf-with-automator/" data-count="horizontal" data-text="Convert Word Documents to PDF with Automator" data-via="thomasmaurer" ></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class='dd_button'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.thomasmaurer.ch%2F2010%2F08%2Fconvert-word-documents-to-pdf-with-automator%2F&amp;locale=en_US&amp;layout=button_count&amp;action=like&amp;width=92&amp;height=20&amp;colorscheme=light' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:92px; height:20px;' allowTransparency='true'></iframe></div></div><div style='clear:both'></div></div><div style='clear:both'></div><p>I got a lot of Microsoft Word Documents form one of our professors at <a title="KTSI" href="http://www.ktsi.ch" target="_blank">KTSI</a>. But <a title="Evernote" href="http://www.evernote.com" target="_blank">Evernote</a> only supports text recognition inside PDFs. So I converted all Word Documents to PDF with the <a title="Mac OS X Automator" href="http://www.macosxautomation.com/automator/" target="_blank">Mac OS X Automator</a>.</p>
<p>How to convert Word Documents to PDF:</p>
<ol>
<li>Open Automator under Mac OS X</li>
<li>Add a &#8220;Get Specified Finder Items&#8221; object</li>
<li>Select the Word Documents</li>
<li>Add another &#8220;Convert Format of Word Documents&#8221; object</li>
<li>Set the Format to &#8221; Portable Document Format (PDF)&#8221;</li>
<li>Now click run and the Automator will convert all your Word Documents and you can find them in the same folder as the Word Documents</li>
</ol>
<p><a href="http://www.thomasmaurer.ch/wp-content/uploads/2010/08/Automator.tiff"><img class="aligncenter size-full wp-image-966" title="Mac OS X Automator" src="http://www.thomasmaurer.ch/wp-content/uploads/2010/08/Automator.tiff" alt="Mac OS X Automator" /></a></p>
<!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com --><div class="shr-publisher-965"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thomasmaurer.ch/2010/08/convert-word-documents-to-pdf-with-automator/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Cheatsheet: Using Diskpart on a Server Core installation #4</title>
		<link>http://www.thomasmaurer.ch/2010/02/cheatsheet-using-diskpart-on-a-server-core-installation-4/</link>
		<comments>http://www.thomasmaurer.ch/2010/02/cheatsheet-using-diskpart-on-a-server-core-installation-4/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 20:56:42 +0000</pubDate>
		<dc:creator>Thomas Maurer</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Server Core]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Windows Server 2003]]></category>
		<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[Windows Server 2008 R2]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[Core]]></category>
		<category><![CDATA[Core Server]]></category>
		<category><![CDATA[CREATE PARTITION]]></category>
		<category><![CDATA[CREATE VOLUME]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[disk administration]]></category>
		<category><![CDATA[disk management]]></category>
		<category><![CDATA[diskpart]]></category>
		<category><![CDATA[diskpart.exe]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[gpt]]></category>
		<category><![CDATA[Partition]]></category>
		<category><![CDATA[select disk]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[volume]]></category>
		<category><![CDATA[Windows Server 2008 Core]]></category>
		<category><![CDATA[Windows Server 2008 R2 Core]]></category>
		<category><![CDATA[Windwos Server 2008]]></category>

		<guid isPermaLink="false">http://www.thomasmaurer.ch/?p=478</guid>
		<description><![CDATA[Using Diskpart on a Server Core installation. Disk Administration or Partition a disk. Create a new partition and format a partition SELECT DISK 0 CREATE PARTITION PRIMARY ASSIGN LETTER=E SELECT PARTITION 1 FORMAT FS=NTFS LABEL="New Volume" QUICK EXIT Commands you &#8230; <a href="http://www.thomasmaurer.ch/2010/02/cheatsheet-using-diskpart-on-a-server-core-installation-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script><g:plusone size='small' href='http://www.thomasmaurer.ch/2010/02/cheatsheet-using-diskpart-on-a-server-core-installation-4/'></g:plusone></div><div class='dd_button'><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.thomasmaurer.ch/2010/02/cheatsheet-using-diskpart-on-a-server-core-installation-4/" data-count="horizontal" data-text="Cheatsheet: Using Diskpart on a Server Core installation #4" data-via="thomasmaurer" ></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class='dd_button'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.thomasmaurer.ch%2F2010%2F02%2Fcheatsheet-using-diskpart-on-a-server-core-installation-4%2F&amp;locale=en_US&amp;layout=button_count&amp;action=like&amp;width=92&amp;height=20&amp;colorscheme=light' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:92px; height:20px;' allowTransparency='true'></iframe></div></div><div style='clear:both'></div></div><div style='clear:both'></div><p>Using Diskpart on a Server Core installation. Disk Administration or Partition a disk.</p>
<blockquote><p><strong>Create a new partition and format a partition</strong></p>
<p><code>SELECT DISK 0<br />
CREATE PARTITION PRIMARY<br />
ASSIGN LETTER=E<br />
SELECT PARTITION 1<br />
FORMAT FS=NTFS LABEL="New Volume" QUICK<br />
EXIT</code></p>
<p><strong>Commands you may then issue at the DISKPART prompt:</strong></p>
<p> <code>LIST Disk</code><br />
 <code>LIST Partition</code><br />
<code>LIST Volume</code></p>
<p><code> SELECT Disk n</code><br />
 <code>SELECT Volume n</code><br />
<code> SELECT Partition n</code></p>
<p> <code>DETAIL Disk</code><br />
<code> DETAIL Partition</code><br />
<code> DETAIL volume</code></p>
<p><code> HELP</code><br />
<code> REM</code>  (remark/comment)<br />
<code> EXIT</code></p>
<p><strong>Commands to Manage Basic Disks:</strong></p>
<p>  (set the current in-focus partition to be the system partition)</p>
<p><code>ASSIGN</code>         (allocate the next free drive letter)<br />
 <code>ASSIGN LETTER=l</code>   (Choose a free letter)</p>
<p> <code>CREATE PARTITION Primary Size=50000 </code> (50 GB)<br />
<code> CREATE PARTITION Extended Size=25000</code><br />
<code> CREATE PARTITION logical Size=25000</code></p>
<p> <code>DELETE Partition</code></p>
<p> <code>EXTEND Size=10000</code></p>
<p><code> REMOVE letter=l  </code>(Remove drive letter l from the in-focus partition)<br />
<code> REMOVE /ALL  </code>  (Remove ALL current drive letters and mount points)</p>
<p><strong>Commands to Manage Dynamic Disks:</strong></p>
<p>   (set the current in-focus partition to be the system partition)</p>
<p><code> ASSIGN</code>         (allocate the next free drive letter)<br />
<code> ASSIGN LETTER=l </code>  (Choose a free letter)</p>
<p><code> ADD disk=n </code>  (Add a mirror to the in-focus SIMPLE volume on the specified disk.)</p>
<p> <code>BREAK disk=n</code>  (Break the current in-focus mirror)</p>
<p><code> CREATE VOLUME Simple Size=n Disk=n</code><br />
 <code>CREATE VOLUME Stripe Size=n Disk=n,n,...</code><br />
 <code>CREATE VOLUME Raid Size=n Disk=n,n,...</code></p>
<p> <code>DELETE DISK</code><br />
 <code>DELETE PARTITION</code><br />
 <code>DELETE VOLUME</code></p>
<p><code> EXTEND disk=n [Size=n]</code><br />
 <code>IMPORT</code><br />
 <code>ONLINE</code></p>
<p><code> REMOVE letter=l  </code>(Remove drive letter l from the in-focus volume)<br />
 <code>REMOVE /ALL   </code> (Remove ALL current drive letters and mount points)<br />
 <code>RETAIN</p>
<p></code><strong>Commands to Convert Disks:</strong></p>
<p><code>CONVERT mbr<br />
 CONVERT gpt<br />
 CONVERT dynamic<br />
 CONVERT basic</p>
<p> CLEAN ALL</code>   (remove all partition and volume info from the hard drive)<br />
 <code>RESCAN</code></p></blockquote>
<!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com --><div class="shr-publisher-478"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thomasmaurer.ch/2010/02/cheatsheet-using-diskpart-on-a-server-core-installation-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

