VSCode Snippet for a PowerShell Foreach Loop with Write-Progress

Code Snippets are a great tool in any code editor.  Snippets are templates which make it very easy to implement commonly used code such as loops.  I find that code snippets really shine for less-commonly used code as well. Here's how to create a simple VSCode Code Snippet to quickly implement less-common code and keep you focused on the task at hand. Continue Reading

Accessing UNC paths when using other PSProviders

In PowerShell, the default Provider is usually the filesystem: C: drive, D: drive, etc. This provider can also access UNC paths, i.e, file shares on your network: \\MyServer\MyShare\exampleFile.txt  When creating a script or working in the console you sometimes need to use different PSProviders to access other types of resources.  Examples of this are the … Continue reading Accessing UNC paths when using other PSProviders

Using PowerShell to query MECM Deployment status (No WMI Required)

I was recently asked by a teammate to assist them with creating a script to automatically reboot an application environment after monthly Windows patching.  The environment has multiple servers which need to be rebooted in a certain order with pre- and post-reboot validations. An automation script would save the team dozens of hours a month. … Continue reading Using PowerShell to query MECM Deployment status (No WMI Required)