3 Useful Powershell Commands

Benoit LecoursPowershell, SCCMLeave a Comment


Here’s 3 useful Powershell commands that you can use to save time.

#1 – Clear PXE Cache from your OSD Collection

Who likes to clear the PXE cache of deployed computers ? Not me !

Instead of this :

 3 useful Powershell commands

Run this :

Clear-CMPxeDeployment -DeviceCollectionId “YourCollectionID”

#2 – Unlock an object

Instead of this : ZzzzzZz (waiting)

3 useful Powershell commands

Run this :

Unlock-CMObject -InputObject $(Get-CMApplication -Name “Application Name”)

TIP : You can change “Get-CMApplication” for “Get-CMTaskSequence” if you want to unlock a Task Sequence for exemple.

#3 – List which collection has Incremental update enabled

Did you know Microsoft supports only 200 collection using incremential update ? Up to that, you won’t be supported. So how to list all collection that have it enabled ?


Instead of this (on each collection !) :

3 useful Powershell commands

Run This :

Get-CMDeviceCollection | Where{$_.RefreshType -eq 6} | Select Name

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Leave a Reply