PowerTip: Find PowerShell Logging Info

Summary: Use a Windows PowerShell cmdlet to retrieve logged information about Windows PowerShell.  How can I easily find logged information about Windows PowerShell?  Use the Get-WinEvent cmdlet and look for a LogName with powershell in the name: Get-WinEvent -LogName *powershell*

0

PowerTip: View PowerShell Console Host Information

Summary: View Windows PowerShell console host information.  How can I easily find information about the Windows PowerShell console host?  Use the Get-Host cmdlet, and select the RawUI property from the InterhostUserInterface object: (get-host).ui.RawUI

0

PowerTip: Use PowerShell to Display Date, Time, and Hour

Summary: Use Windows PowerShell to display date, time, and hour in 24-hour format.  How can I use Windows PowerShell to get the hour of the day in 24-hour format?  Use the Get-Date cmdlet and specify the “%H” pattern to the UFormat parameter (H is case sensitive): get-date -UFormat “%H”

0

PowerTip: Customize How PowerShell Displays a Date

Summary: Easily customize the way Windows PowerShell displays a date.  How can I use Windows PowerShell to easily display the date as day-dash-month-dash-four-digit year?  Use the Get-Date cmdlet,specify a custom format by using the Format parameter, and use dd for the date, M for the month and yyyy for a four-digit year (this is case sensitive): Get-Date -Format “dd-M-yyyy”

0

PowerTip: Use PowerShell to Display Locale-Specific Date

Summary: Learn how to use Windows PowerShell to display the date in locale-specific format.  How can I use Windows PowerShell to display the day, month, and two-digit year in locale specific format?  Use the Get-Date cmdlet and the –uformat parameter: get-date -UFormat %x

0

PowerTip: Display All PowerShell Modules and Cmdlets

Summary: Learn how to display all Windows PowerShell modules and cmdlet names.  How can I get output that shows Windows PowerShell module names and the cmdlets or functions that are contained inside the modules?  Use the Get-Module cmdlet, and then for each module, display the name and use Get-Command (gcm is an alias) to retrieve the cmdlets and functions (this…

0

PowerTip: Use PowerShell to Write BitLocker Recovery Key to Text File

Summary: Use Windows PowerShell to write your BitLocker recovery key to a text file.  If I forgot to save my BitLocker recovery key when I enabled BitLocker on my laptop, how can I use Windows PowerShell to write it to a text file so I can copy it to a USB key for safe keeping?…

0

PowerTip: Find Case-Specific Strings by Using PowerShell

Summary: Use Windows PowerShell to find case-specific strings.  How can I find a particular, case-sensitive word in a string?  Use Select-String and specify the –CaseSensitive switch: “Hey Scripting Guy”,”hey scripting guy” | Select-String -Pattern ‘hey’ -CaseSensitive

0

PowerTip: Use PowerShell to Show Approved Verbs Group

Summary: Use Windows PowerShell to show the group of approved Windows PowerShell verbs.  How can I find the grouping information for a couple of approved verbs that I want to use to name my advanced functions?  Use the Get-Verb function, and supply an array of verbs to the function: get-verb ping, receive  

0