{"id":9031,"date":"2006-12-25T15:09:00","date_gmt":"2006-12-25T15:09:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2006\/12\/25\/send-signaturetoclipboard\/"},"modified":"2019-02-18T13:21:01","modified_gmt":"2019-02-18T20:21:01","slug":"send-signaturetoclipboard","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/send-signaturetoclipboard\/","title":{"rendered":"Send-SignatureToClipBoard"},"content":{"rendered":"<p>In my previous blog about the <a href=\"http:\/\/blogs.msdn.com\/powershell\/archive\/2006\/12\/25\/philosophy-of-automation.aspx\">Philosophy of Automation<\/a>, I encouraged everyone to share their automation even when it was small.&nbsp; Here I&#8217;ll follow that advice.<\/p>\n<p>I find myself doing quite a bit of blogging&nbsp;and commenting on other people&#8217;s blogs.&nbsp; I am often struck by the sorry state of blogging software.&nbsp; I could go on for quite some time on that topic but the one thing I want to highlight is the issue of Signatures.&nbsp; I have a signature that I use for all my entries.&nbsp; I used to type it in each time but then I would get variations because I didn&#8217;t remember it quite right and it was a pain to type (BTW &#8211; Automation is not JUST about productivity &#8211; it is about QUALITY as well.&nbsp; I should blog that at some point.)&nbsp; Anyway, it didn&#8217;t take me long to put this into a file SIG.TXT that I would then &#8220;cat&#8221; in a PowerShell window and then&nbsp;cut-n-paste into the application. The problem is that I&#8217;m not a very good cut-n-paster and sometimes I vary the size of my PowerShell Window which caused wrapping so I would have to change the size of my window and cat the file again (and then change it back).&nbsp; <\/p>\n<p>It&#8217;s sad to admit how long I put up with this stupid workflow before I decided to automate it but now in my profile file I have the following:<\/p>\n<p>function Send-SignatureToClipBoard<br \/>{<br \/>&nbsp;&nbsp; cat c:\\ps\\Sig.txt |clip<br \/>}<br \/>Set-Alias snstc Send-SignatureToClipBoard<\/p>\n<p>This&nbsp;sends my&nbsp;signature into the clipboard (I bet a $1 you could have guessed that \ud83d\ude42 ) so that can paste it with ease.&nbsp; Notice that I gave it a good descriptive name&nbsp;to help me remember it (&#8220;Send&#8221; is a common verb) and to make it&nbsp;self-documenating and then a pithy alias (&#8220;SN&#8221; is the recommended shortcut for &#8220;SEND&#8221; so it is it is very easy to remember, I think the sentence as I type &#8220;SeNd Signature To Clipboard&#8221; =&gt; SNSTC).<\/p>\n<p>So this is a good example of a simple bit of automation that isn&#8217;t going to change the world but it does move the ball forward a bit.&nbsp; I hope you find it useful.&nbsp; If you found this useful, I&#8217;ve made my point and you should do the same.<\/p>\n<p>Cheers! &nbsp;(Time to switch to my PowerShell window to type SNSTC!) <\/p>\n<p>Jeffrey Snover [MSFT]<br \/>Windows PowerShell\/MMC Architect<br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n<blockquote>\n<p><strong>Postscript:<\/strong>&nbsp; <em>It turns out that CLIP.EXE is only shipped with Vista (so upgrade today \ud83d\ude42 ).&nbsp; It turns out that that is a great thing because it should encourage you to download, use, participate-in&nbsp;the <a href=\"http:\/\/www.codeplex.com\/Wiki\/View.aspx?ProjectName=PowerShellCX\">PowerShell Community Extensions Project<\/a>.&nbsp;&nbsp; It has an out-ClipBoard project which should work a treat for you!&nbsp;<\/em><\/p>\n<\/blockquote>\n<p><em><\/em>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my previous blog about the Philosophy of Automation, I encouraged everyone to share their automation even when it was small.&nbsp; Here I&#8217;ll follow that advice. I find myself doing quite a bit of blogging&nbsp;and commenting on other people&#8217;s blogs.&nbsp; I am often struck by the sorry state of blogging software.&nbsp; I could go on [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9031","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>In my previous blog about the Philosophy of Automation, I encouraged everyone to share their automation even when it was small.&nbsp; Here I&#8217;ll follow that advice. I find myself doing quite a bit of blogging&nbsp;and commenting on other people&#8217;s blogs.&nbsp; I am often struck by the sorry state of blogging software.&nbsp; I could go on [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=9031"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9031\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=9031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=9031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=9031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}