To make your script more understandable and provide a professional help of your script, you can add help to your script.
Add the following lines to the top of your script or add these lines to a function for extra explanation of the function.
<# .SYNOPSIS .DESCRIPTION .PARAMETER <parameter> .PARAMETER <parameter> .EXAMPLE .EXAMPLE .NOTES .LINK #>
Run your script once and then type the following command :
get-help <scriptname>
More Stories
Running PowerShell Hyper-V and VMWare Modules
Extend the Evaluation Period on Windows Server
Now using Ansible, Chocolatey, Powershell