Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Latest posts

Jan 21, 2016
Post comments count 0
Post likes count 0

PowerTip: Find top PowerShell cmdlet nouns

Doctor Scripto

Summary: Learn how to find the top five nouns in Windows PowerShell cmdlets.  How can I find which nouns are the most prevalent in Windows PowerShell cmdlets?  You need to find all of the cmdlet names, group them by noun, sort them by count, and then select only           the first five, for example: gcm * -CommandType cmdlet | group noun -noelement | sort count -Descending | select -First 5 Note gcm is an alias for Get-Command.

Jan 20, 2016
Post comments count 0
Post likes count 0

PowerTip: Use PowerShell to return first two lines of file

Doctor Scripto

Summary: Learn how to use Windows PowerShell to return the first two lines of a text file. How can I use Windows PowerShell to easily return the first two lines of a text file? Use the Get-Content cmdlet and specify the TotalCount parameter. In this example, TotalCount is set           to 2 and the file is named AMoreComplete.txt:Get-Content 'C:\fso\AMoreComplete.txt' -TotalCount 2

Jan 20, 2016
Post comments count 0
Post likes count 0

PowerTip: Use PowerShell to return first two lines of file

Doctor Scripto

Summary: Learn how to use Windows PowerShell to return the first two lines of a text file. How can I use Windows PowerShell to easily return the first two lines of a text file? Use the Get-Content cmdlet and specify the TotalCount parameter. In this example, TotalCount is set           to 2 and the file is named AMoreComplete.txt:Get-Content 'C:\fso\AMoreComplete.txt' -TotalCount 2

Jan 19, 2016
Post comments count 0
Post likes count 0

PowerTip: Find related cmdlet aliases

Doctor Scripto

Summary: Learn how to find aliases related to a series of cmdlets.  How can I find aliases that are related to a series of Windows PowerShell cmdlets, such as processes?  Use the Get-Alias cmdlet and specify a wildcard character for the definition parameter, for example: Get-Alias -Definition "*process"

Jan 19, 2016
Post comments count 0
Post likes count 0

PowerTip: Find related cmdlet aliases

Doctor Scripto

Summary: Learn how to find aliases related to a series of cmdlets. How can I find aliases that are related to a series of Windows PowerShell cmdlets, such as processes? Use the Get-Alias cmdlet and specify a wildcard character for the definition parameter, for example:Get-Alias -Definition "*process"

Jan 18, 2016
Post comments count 0
Post likes count 0

PowerTip: Find cmdlets and functions related to DSC

Doctor Scripto

Summary: Use Windows PowerShell to find cmdlets and functions related to Desired State Configuration.  How can I use Windows PowerShell to quickly find a list of cmdlets and functions related to            Desired State Configuration (DSC)?  Use the Get-Command cmdlet and specify a noun of *dsc*: Get-Command -Noun *DSC*

Jan 18, 2016
Post comments count 0
Post likes count 0

PowerTip: Find cmdlets and functions related to DSC

Doctor Scripto

Summary: Use Windows PowerShell to find cmdlets and functions related to Desired State Configuration.  How can I use Windows PowerShell to quickly find a list of cmdlets and functions related to            Desired State Configuration (DSC)?  Use the Get-Command cmdlet and specify a noun of *dsc*: Get-Command -Noun *DSC*

Jan 17, 2016
Post comments count 0
Post likes count 0

PowerTip: Find Amount of Time Between Two Dates

Doctor Scripto

Summary: Learn how to use Windows PowerShell to find the amount of time between two dates.  How can I use Windows PowerShell to determin how many days until            Windows PowerShell Saturday on March 19, 2016 in Tampa?  There are many ways to find the difference between two dates. I use the [datetime] type accelerator            and subtraction, for example: [datetime]'3/19/16' - [datetime]::now  

Jan 17, 2016
Post comments count 0
Post likes count 0

Weekend Scripter: Find Information on the Hey, Scripting Guy! Blog

Doctor Scripto

Summary: Ed Wilson, Microsoft Scripting Guy, talks about how to find stuff on the Hey, Scripting Guy! Blog. Microsoft Scripting Guy, Ed Wilson, is here. It is hard to imagine that it is 2016. It’s even harder to imagine that I have been writing the Hey, Scripting Guy! Blog since 2008! With the current pace of twice a day posts, 7 days a week, there are literally thousands of Hey, Scripting Guy! Blog posts—plus there was a team writing Scripting Guy content before there was a Hey, Scripting Guy! Blog. One of my first major projects after becoming the Microsoft Scripting Guy was to work with my editor a...