Skip to content

Scripting tips and scripts templates samples (for example, I like to always use a "StopWatch" in all my scripts to write how much it took to execute ... also will include progress bars, etc...)

License

SammyKrosoft/PowerShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script-Writing-Templates-and-Functions

Hi, Sammy from Microsoft here_ Here's a GitHub repository where I'll post some templates and simple samples to help you getting started with Powershell, give you ideas with useful and simple functions that will help you on day to day operations, or help you impress your boss with amazing PowerShell tricks_ You'll find stuff like Powershell template containing script comments which will enable you to auto-generate PowerShell help, as well as how to create and use PowerShell progress bars, samples to define and populate PowerShell objects, a sample PowerShell script template of my own (for example I like to use a "StopWatch" all the time to measure my script's duration: my sample "Sam" template include its definition, startup, stop and time elapsed display), and I'll try to post more as I discover or think about useful tricks or How-Tos_

Template-* files

Template-Comments-*

Includes common structure with comments, variables part, functions part, ... _

Template-Sam-*

Create a Template-Sam-* which is a template I'll use all the time for example to include script execution time, logging file definition with date and time stamp, variable declaration part, functions part, etc... _

Function-*

Simple or more complex functions that I find useful and that can pick when I need these (for example, logging functions, there are 2 I like for now : a simple one, and a more complex one from Sam Boutros, a great powershell developper)_

How-To-*

Simple scripts with a lot of comments, intended to help you understanding some concepts of PowerShell that are useful in a day-to-day life of a PowerShell scripter_ Example, the first one created on this site is a "How-To-User-ProgressBar.ps1" super-commented script to drill down the required steps to create a PowerShell progress bar... _

Sample-*

Scripts that I used for customers onsite

Other

See some PowerShell examples buried on my messaging oriented Microsoft TechNet Blog : http://aka.ms/sammy

Ok_

About

Scripting tips and scripts templates samples (for example, I like to always use a "StopWatch" in all my scripts to write how much it took to execute ... also will include progress bars, etc...)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published