<?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>bad idea to use shortcode in scripts Archives - the Sysadmin Channel</title>
	<atom:link href="https://thesysadminchannel.com/tag/bad-idea-to-use-shortcode-in-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/tag/bad-idea-to-use-shortcode-in-scripts/</link>
	<description>Documenting My Life as a System Administrator</description>
	<lastBuildDate>Tue, 14 Aug 2018 04:57:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
<site xmlns="com-wordpress:feed-additions:1">144174110</site>	<item>
		<title>Why Its A Bad Idea To Use Shortcode Or Alias&#8217; In Scripts</title>
		<link>https://thesysadminchannel.com/why-its-a-bad-idea-to-use-shortcode-or-alias-in-scripts/</link>
					<comments>https://thesysadminchannel.com/why-its-a-bad-idea-to-use-shortcode-or-alias-in-scripts/#respond</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Thu, 02 Aug 2018 04:33:40 +0000</pubDate>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[bad idea to use shortcode in scripts]]></category>
		<category><![CDATA[bad practice powershell scripting]]></category>
		<category><![CDATA[don't use alias in scripts]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=912</guid>

					<description><![CDATA[<p>Seriously.. So I&#8217;m trying to teach a co-worker some Powershell techniques and skills to help him automate some of his work and he comes across &#124; ? {bla bah}. Before he asks me what this exactly means he goes on&#8230; <a href="https://thesysadminchannel.com/why-its-a-bad-idea-to-use-shortcode-or-alias-in-scripts/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/why-its-a-bad-idea-to-use-shortcode-or-alias-in-scripts/">Why Its A Bad Idea To Use Shortcode Or Alias&#8217; In Scripts</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Seriously.. So I&#8217;m trying to teach a co-worker some Powershell techniques and skills to help him automate some of his work and he comes across <code>| ? {bla bah}</code>. Before he asks me what this exactly means he goes on a wild Google goose chase trying to find out what <code>?</code> means in Powershell.  This can obviously be very frustrating if you&#8217;re barely getting to know the basics.  A good rule of thumb is to use shortcode or the alias in the command line, and use the full cmdlet in your scripts.</p>
<p>Just remember when creating your scripts, there is a pretty good possibility that it will remain in use many years after you leave. Some people who are just starting their Powershell journey might not have the knowledge to understand whats going on, let alone when you use shortcode / aliases in there.</p>
<p>Just thought I would throw that out there..</p>
<p>Edit:  There is the method of doing a <code>Get-Alias ?</code> and it will provide you the output of what that means, however, most people won&#8217;t know that&#8217;s even a thing.</p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2018/08/Get-Alias-use-Shortcode.png" target="_blank"><img fetchpriority="high" decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2018/08/Get-Alias-use-Shortcode.png" alt="Get-Alias use Shortcode" width="917" height="462" class="aligncenter size-full wp-image-913" srcset="https://thesysadminchannel.com/wp-content/uploads/2018/08/Get-Alias-use-Shortcode.png 917w, https://thesysadminchannel.com/wp-content/uploads/2018/08/Get-Alias-use-Shortcode-768x387.png 768w" sizes="(max-width: 917px) 100vw, 917px" /></a><br />
&nbsp;</p>
<p>Just for reference:<br />
<strong>%</strong> in Powershell means <strong>ForEach-Object</strong>.<br />
<strong>?</strong> in Powershell means <strong>Where-Object</strong>.</p>
<p>If you&#8217;re looking to expand your Powershell knowledge check out <a href="https://amzn.to/2HoPSfw" target="_blank" rel="noopener">Don Jones Learn Powershell In a Month Of Lunches Book</a>.<br />
&nbsp;</p>
<p>Also, as a reminder, don&#8217;t forget to check out our <a href="https://www.youtube.com/channel/UC9VnUjmZrNG3ithDZmG-S-g" rel="noopener" target="_blank">Youtube Channel</a> for awesome Sysadmin tutorials and How-To&#8217;s.</p>
<p>The post <a href="https://thesysadminchannel.com/why-its-a-bad-idea-to-use-shortcode-or-alias-in-scripts/">Why Its A Bad Idea To Use Shortcode Or Alias&#8217; In Scripts</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/why-its-a-bad-idea-to-use-shortcode-or-alias-in-scripts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">912</post-id>	</item>
	</channel>
</rss>
