Tag: Powershell

PowerShell Copy To Clipboard

Sometimes copy paste is just really hard. If you’ve ever found yourself working through multiple RDP sessions you’ve probably attempted to copy or paste something in a PowerShell session only to have it fail horribly. Maybe you’ve been trying to look at some returned data only to have it output in some weird list. CLIP ...

VSCode – PowerShell Formating

If you’ve been writing in Powershell for any period of time, you’ve at some point encountered one of the various Powershell formatting arguments. It’s always some type of semantic detail. While this post can’t fix all of those it certainly can help solve a lot of the basic arguments including how to format functions, parenthesis ...

PowerShell and #Requires

Did I run that script as admin? Have you ever written a Powershell script only to get slapped in the face with a bunch of angry red text and an access denied message? I know at some point I have. The logical course of action is to of course google “how do I make sure ...

How To: Import the ConfigMgr Module – $Profile Style

Setting the scene If you are like me you probably find yourself frequently in a spot where you would like to import the Configuration Manager module to do this one thing. No one wants to open the console and load the ISE. No one wants to have to use the Snippet, I just want to ...

How To – Find All DPS missing NO_SMS_ON_DRIVE on C:\ – And Fix it

C:\ Drive on my DP ran out of space… again… Something that constantly comes up is forgetting to place the NO_SMS_ON_DRIVE.SMS file on new distribution point servers. While this isn’t the end of the world its certainly frustrating when the C:\ drive runs out of space. Just in case you don’t know what I’m talking ...

How To: Make VSCode Create new PowerShell file by default

VSCode Settings VSCode has become my and many other creators editor of choice. However, I find myself updating certain settings regularly. One of those settings is default file type for new files. An upside of changing the default file type is allowing the PowerShell extension to immediately parse your work. If you have not looked ...

How To: PowerShell progress bars

Ever since I started learning PowerShell I have been a fan of various PowerShell “How To” guides. After learning so much from so many people I decided I should start my own to give back to the PowerShell community. I’ll be running a series of posts that re PowerShell “How to” guides that give examples ...

Creating VSCode User Snippets for PowerShell

If you spend time working with VSCode you’ll learn there are cool functions like “User Snippets” you can customize. I’ve talked about these before on another blog and showcased creating User Snippets that allow you to import the Configuration Manager PowerShell module. I wanted to go a step further with a few more snippets I’ve ...

Creating Maintenance Window Collections

It’s been a long held tradition to not create deployments for collections that have Maintenance windows and there are in fact a LOT of other rules that come along with using maintenace windows in a production environment. Almost a year or so ago I worked with a friend of mine to create some pretty cool ...

Add an AD Group rule to a collection with PowerShell

It’s been a long time since I’ve posted anything on my blog but after a year of writing with the SCConfigMgr team on a regular basis I thought it was time to give my roots a little bit of loving. When creating a collection in ConfigMgr its really common that we use an Active Directory ...