<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kamil Pro</title>
    <description>The latest articles on DEV Community by Kamil Pro (@kamilpro).</description>
    <link>https://dev.to/kamilpro</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F696855%2F0c73a015-1acf-4cf3-ae44-a3ec1831e265.jpeg</url>
      <title>DEV Community: Kamil Pro</title>
      <link>https://dev.to/kamilpro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kamilpro"/>
    <language>en</language>
    <item>
      <title>❓ Do you allow wrong input to enter your function?</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Sat, 19 Oct 2024 15:38:34 +0000</pubDate>
      <link>https://dev.to/kamilpro/do-you-allow-wrong-input-to-enter-your-function-4jo1</link>
      <guid>https://dev.to/kamilpro/do-you-allow-wrong-input-to-enter-your-function-4jo1</guid>
      <description>&lt;p&gt;✋ Then stop, PowerShell can help you validate your parameters.&lt;/p&gt;

&lt;p&gt;The first picture shows how to manually validate whether the number provided is between 1 and 100. It's not perfect.&lt;/p&gt;

&lt;p&gt;The second picture does the same and more with fewer lines of code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1️⃣ Makes the parameter required&lt;/li&gt;
&lt;li&gt;2️⃣ Ensures the provided number is within 1 and 100&lt;/li&gt;
&lt;li&gt;3️⃣ The [int] type ensures the $Number parameter is an integer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If any of the checks fails, PowerShell prompts the user for the right data, or errors out.&lt;/p&gt;

&lt;p&gt;The wrong input never enters your function - it's like a bouncer at the party!&lt;/p&gt;

&lt;p&gt;Follow me for more tips!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9zs9f04hqfn6umegqjpb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9zs9f04hqfn6umegqjpb.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq40gzibv5mgpn81fzg4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq40gzibv5mgpn81fzg4f.png" alt="Image description" width="800" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>windows</category>
      <category>sysadmin</category>
      <category>scripting</category>
    </item>
    <item>
      <title>Mastering Output Formatting in seconds - PowerShell Pro Tips</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Tue, 23 Jul 2024 11:37:09 +0000</pubDate>
      <link>https://dev.to/kamilpro/mastering-output-formatting-in-seconds-powershell-pro-tips-2on1</link>
      <guid>https://dev.to/kamilpro/mastering-output-formatting-in-seconds-powershell-pro-tips-2on1</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://www.youtube.com/shorts/JL2dyI2r-ko" rel="noopener noreferrer"&gt;
      youtube.com
    &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Mastering Output Formatting in seconds - PowerShell Pro Tips&lt;/p&gt;

&lt;p&gt;Unlock the power of PowerShell with this quick tutorial on output formatting! Learn how to use display information as a table or list, sort processes by CPU usage, and convert data to CSV or JSON. &lt;/p&gt;

&lt;p&gt;Perfect for IT pros and PowerShell beginners looking to level up their command-line skills.&lt;/p&gt;

&lt;p&gt;More PowerShell tutorials: &lt;a href="https://kamilpro.com" rel="noopener noreferrer"&gt;https://kamilpro.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>automation</category>
      <category>devops</category>
    </item>
    <item>
      <title>Developing a Web Application with PowerShell - Pode, the PowerFul Module</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Sun, 29 Jan 2023 15:25:14 +0000</pubDate>
      <link>https://dev.to/kamilpro/developing-a-web-application-with-powershell-pode-the-powerful-module-97c</link>
      <guid>https://dev.to/kamilpro/developing-a-web-application-with-powershell-pode-the-powerful-module-97c</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/N-yjDGzEYak"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Web Applications are popular, and often require to either knowing some front-end development or using some other products which allow to build some applications. What about PowerShell, can you actually build a web app using only PowerShell language? &lt;/p&gt;

&lt;p&gt;Yes, you can write a web app in PowerShell, and I'm going to show you how in this video.&lt;/p&gt;

&lt;p&gt;It comes down to two PowerShell modules - Pode and Pode.Web - all you need to do is to run Install-Module Pode,Pode.Web and you can start building your applications.&lt;/p&gt;

&lt;p&gt;I will be writing a simple password generation and management web app during video, and source code is available on GitHub - so that you can either follow me, or just grab source code and see how this whole Pode module works yourself. And since the video touches only briefly what Pode is capable of, I'm really looking forward your views and feedback.&lt;/p&gt;

&lt;p&gt;Code: &lt;a href="https://github.com/thekamilpro/About-PowerShell/tree/main/PowerFul%20Modules/Pode" rel="noopener noreferrer"&gt;https://github.com/thekamilpro/About-PowerShell/tree/main/PowerFul%20Modules/Pode&lt;/a&gt;&lt;br&gt;
Pode website: &lt;a href="https://badgerati.github.io/Pode" rel="noopener noreferrer"&gt;https://badgerati.github.io/Pode&lt;/a&gt;&lt;br&gt;
Pode.Web website: &lt;a href="https://badgerati.github.io/Pode.Web/" rel="noopener noreferrer"&gt;https://badgerati.github.io/Pode.Web/&lt;/a&gt;&lt;br&gt;
Pode Discord: &lt;a href="https://discord.gg/fRqeGcbF6h" rel="noopener noreferrer"&gt;https://discord.gg/fRqeGcbF6h&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gratitude</category>
      <category>showdev</category>
    </item>
    <item>
      <title>PowerShell Error Handling - One error at the time please</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Sun, 29 Jan 2023 15:23:22 +0000</pubDate>
      <link>https://dev.to/kamilpro/powershell-error-handling-one-error-at-the-time-please-1pfb</link>
      <guid>https://dev.to/kamilpro/powershell-error-handling-one-error-at-the-time-please-1pfb</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/-rQTBuaIVS8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Code fails - whether because of reasons out of our control, or because we didn't consider the situation it might fail. Expired credentials, timeout connections, lack of permissions go genuine software bug - each of these are potential problem which might fall our code over. And if we don't handle the error, our script will simply throw and terminate. It's certainly not desired state.&lt;/p&gt;

&lt;p&gt;In this video I'll show you different ways PowerShell can error, how to debug such errors and how to handle them - so that we are in control.&lt;/p&gt;

&lt;p&gt;Code: &lt;a href="https://github.com/thekamilpro/About-PowerShell/tree/main/PowerShell%20Error%20Handling" rel="noopener noreferrer"&gt;https://github.com/thekamilpro/About-PowerShell/tree/main/PowerShell%20Error%20Handling&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hackathon</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Building PowerShell module on Azure DevOps pipeline - step by step guide</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Thu, 02 Jun 2022 15:04:41 +0000</pubDate>
      <link>https://dev.to/kamilpro/building-powershell-module-on-azure-devops-pipeline-step-by-step-guide-1ila</link>
      <guid>https://dev.to/kamilpro/building-powershell-module-on-azure-devops-pipeline-step-by-step-guide-1ila</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/RZzmdF1iI7E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The World talks constantly about DevOps, CI/CI pipelines, automation - which great, but where to actually start? Especially when you've been writing PowerShell which is often used as automation language, but not actually as programming language?&lt;/p&gt;

&lt;p&gt;In this video I'll show you how to create a build pipeline for PowerShell module, from scratch. We will start from creating a project, creating new Git repository, pushing code to repository to finally create a pipeline which takes care of building the module, versioning it and finally publishing. And I'll be writing all these steps in front of you.&lt;/p&gt;

&lt;p&gt;If you've been writing PowerShell for some time and would like to get step closer to the DevOps world - this is great video for you! If on the other hand you've been using Azure Pipelines for other languages and need to quickly pick how to build PowerShell module, then later part of video might be useful, or even just just open repo git below, and just look at the yml file in there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Repo with all the files I've been writing and using during the video
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://dev.azure.com/kprocyszyn/_git/About-PowerShell" rel="noopener noreferrer"&gt;https://dev.azure.com/kprocyszyn/_git/About-PowerShell&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Video where I go in more detail about using ModuleBuilder
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://youtu.be/lKO_LPMfV1Y" rel="noopener noreferrer"&gt;https://youtu.be/lKO_LPMfV1Y&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to create PowerShell module and manifest
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://youtu.be/xPQq0ui8j78" rel="noopener noreferrer"&gt;https://youtu.be/xPQq0ui8j78&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>powershell</category>
      <category>video</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Building PowerShell Module - how to organise your source files and build with ease</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Mon, 21 Mar 2022 19:55:09 +0000</pubDate>
      <link>https://dev.to/kamilpro/building-powershell-module-how-to-organise-your-source-files-and-build-with-ease-22oc</link>
      <guid>https://dev.to/kamilpro/building-powershell-module-how-to-organise-your-source-files-and-build-with-ease-22oc</guid>
      <description>&lt;p&gt;Ever wanted to build #PowerShell module with ease? Wondered how to organise your source files? I made a video describing step by step of the process, with sample files on GitHub!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/lKO_LPMfV1Y" rel="noopener noreferrer"&gt;Building PowerShell Module - how to organise your source files and build&lt;/a&gt;&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>module</category>
      <category>building</category>
      <category>video</category>
    </item>
    <item>
      <title>PowerShell Parameter Attributes - validate, group, require params and add pipeline to your function</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Tue, 08 Feb 2022 19:17:42 +0000</pubDate>
      <link>https://dev.to/kamilpro/powershell-parameter-attributes-validate-group-require-params-and-add-pipeline-to-your-function-42ki</link>
      <guid>https://dev.to/kamilpro/powershell-parameter-attributes-validate-group-require-params-and-add-pipeline-to-your-function-42ki</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/hJIAK3qjlZQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Having properly configured parameters help your users to understand the use of your function. It also helps fellow developers to appreciate the intended use of the function. In addition, it gives you more control of how the code flows through your script.&lt;/p&gt;

&lt;p&gt;Parameter attributes is what takes parameters to the next level - you can specify that certain parameters are mandatory, group them together so that only certain combination of parameters is meant to work together, we can even add pipeline support so that function can be used as any other built-in function.&lt;/p&gt;

&lt;p&gt;I will show you all the above with even more, as I always strive to go profoundly in PowerShell explanation!&lt;/p&gt;

&lt;p&gt;Files available at: [&lt;a href="https://github.com/kprocyszyn/About-PowerShell/tree/main/PowerShell%20Function/Parameters" rel="noopener noreferrer"&gt;https://github.com/kprocyszyn/About-PowerShell/tree/main/PowerShell%20Function/Parameters&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>tutorial</category>
      <category>devops</category>
      <category>video</category>
    </item>
    <item>
      <title>PowerShell PSCustomObject - Custom Object, the way it was meant to be</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Tue, 02 Nov 2021 20:05:20 +0000</pubDate>
      <link>https://dev.to/kamilpro/powershell-pscustomobject-custom-object-the-way-it-was-meant-to-be-3ndi</link>
      <guid>https://dev.to/kamilpro/powershell-pscustomobject-custom-object-the-way-it-was-meant-to-be-3ndi</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/DAVGyCytsqM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Everything is an object in PowerShell, and ability to create own object allows for one more way of controlling and handling data.&lt;/p&gt;

&lt;p&gt;In this video I'll take you through the steps of creating PSCustomObject, working with its properties to doing more advanced topics - like adding methods and types to the object.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/thekamilpro" rel="noopener noreferrer"&gt;
        thekamilpro
      &lt;/a&gt; / &lt;a href="https://github.com/thekamilpro/About-PowerShell" rel="noopener noreferrer"&gt;
        About-PowerShell
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      About PowerShell is educational series of videos that teach you about various aspects of PowerShell language.
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>powershell</category>
      <category>object</category>
      <category>hash</category>
      <category>custom</category>
    </item>
    <item>
      <title>Video PowerShell Switch Statement - Different take on branching</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Thu, 02 Sep 2021 18:54:32 +0000</pubDate>
      <link>https://dev.to/kamilpro/video-powershell-switch-statement-different-take-on-branching-d0m</link>
      <guid>https://dev.to/kamilpro/video-powershell-switch-statement-different-take-on-branching-d0m</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/EqJ0lBO1rM4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;GitHub link: &lt;a href="https://github.com/kprocyszyn/About-PowerShell/tree/main/PowerShell%20Switch%20statement" rel="noopener noreferrer"&gt;https://github.com/kprocyszyn/About-PowerShell/tree/main/PowerShell%20Switch%20statement&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One switch statement can replace multiple if/else statements, it makes code more readable and is really easy to use - there's no reason why you shouldn't give it a try!&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>if</category>
      <category>condition</category>
      <category>scripting</category>
    </item>
    <item>
      <title>PowerShell Array and ArrayList - storing multiple items as a one variable</title>
      <dc:creator>Kamil Pro</dc:creator>
      <pubDate>Tue, 31 Aug 2021 17:17:48 +0000</pubDate>
      <link>https://dev.to/kamilpro/powershell-array-and-arraylist-storing-multiple-items-as-a-one-variable-23mm</link>
      <guid>https://dev.to/kamilpro/powershell-array-and-arraylist-storing-multiple-items-as-a-one-variable-23mm</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rvGd8kxXlVc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Link to the script: &lt;a href="https://github.com/kprocyszyn/About-PowerShell/tree/main/PowerShell%20Array" rel="noopener noreferrer"&gt;https://github.com/kprocyszyn/About-PowerShell/tree/main/PowerShell%20Array&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Array is a basic data structure that allows to store multiple items in one variable. In this short video, I'll show you how to create a basic array, populate it with items, how to add, access and modify items within array.&lt;/p&gt;

&lt;p&gt;In addition, I'll present to you how to use ArrayList - which is much more flexible array, especially for adding more items.&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>video</category>
      <category>scripting</category>
      <category>array</category>
    </item>
  </channel>
</rss>
