• Home
  • About
  • Contact
  • Resources
  • News
  • Home
  • About
  • Contact
  • Resources
  • News
Powershell Newbie

Get | Set | Start

Naming Your Scripts

1/16/2018

1 Comment

 
It is a good practice to check for an existing command that may have the name or a similar name to a script you are saving. To do this, use Get-Help and Get-Command to search for matches.
Picture
In this instance, i searched new-vm because i am writing a script to create a new VM for my lab. Since I have Hyper-V installed, I already have a Cmdlet named New-VM.
At this point you need to ask yourself is the existing Cmdlet good enough to do what I want or what sets my script apart. The answers here will help you name your script. In my case the main difference is it being for my lab. Therefore, I will name my script New-LabVM and avoid conflicts.
1 Comment
Max D link
9/22/2021 11:07:42 pm

Hello mate grreat blog post

Reply



Leave a Reply.

    Joshua B. Jones, VCP6-DCV

    Professional PowerShell Fan, Automation & Virtualization Expert

    Archives

    February 2018
    January 2018
    December 2017
    November 2017
    May 2017
    August 2016

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.