Taking on PowerShell one cmdlet at a time

Share this post: This is part of an ongoing blog series by Adam Gordon. Adam will show you how to use each PowerShell command each week. This week Adam will be covering Find-Script.

When to use FindScript
The Find-Script cmdlet searches for a specific script in registered repositories.

How to use FindScript
All scripts available:
All scripts are available in Find-Script.

Use a script to create a list.
Find-Script -Name “StartCCMexec” -RequiredVersion 1.0 -Repository “PSGallery” | Format-List * -Force
This command locates “StartCCMexec”, in the PSGallery repository. It then passes the resulting PSRepositoryItemInfo object, to the Format-List cmdlet.

Find all versions of a script
Find-Script -Name “New-TextMenu” -AllVersions
This command searches for all versions of New TextMenu.

Find scripts that include workflows:
Find-Script -Includes “Workflow” -Repository “PSGallery”

Find-RoleCapability – Last week’s command
Do you need PowerShell training? ITProTV offers PowerShell online IT training courses.