PowerShell – Windows Form MessageBox helper function

Hi Guys, Here is a small function I wrote to help me create MessageBoxes for a customer I worked for past year. I needed a way to create easy interactions within my scripts with the user, and switch the actions regarding the user choices. This function will display the message you want in a Windows […]

PowerShell WMI – Get Disk Information

Hi guys, Here is a small function I wrote to gather basic informations arround the Hard Drive linked to the targeted computer. Function Get-DiskInfo { <# .SYNOPSIS Describe purpose of “Get-DiskInfo” in 1-2 sentences. .PARAMETER ComputerName The computer name or IP of targeted computer. .PARAMETER OSVersion The OS Version of Target Computer. .NOTES Author: Thomas […]

PowerShell – Query domain name WhoIs

Hi Guys, I found, after couple of weeks looking for it, a cool API WebSite that provide an API to query WhoIs : webservicex.net. Once I found out this site I started writing this little PowerShell function to help me serialize all my future actions with this little guy. Here is the function I wrote […]

PowerShell WMI – Querying Operating System product informations

Hi guys, Here is a small function I wrote to gather basic informations arround the Operating System product. [ps]Function Get-ComputerSystemProductInfo { <# .SYNOPSIS Query WMI of the system to provide basic information of the Operating System product. .PARAMETER ComputerName The computer name or IP of targeted computer. .NOTES Author: Thomas Prud’homme (Twitter: @prudhommewtf). .LINK https://blog.prudhomme.wtf/powershell-querying-operating-system-product-informations […]

PowerShell WMI – Querying CD ROM informations

Hi guys, Here is a small function I wrote to gather the CD ROM drive basic informations. [ps]Function Get-CDROMInfo { <# .SYNOPSIS Query WMI of the system to provide basic CDROM information. .PARAMETER ComputerName The computer name or IP of targeted computer. .NOTES Author: Thomas Prud’homme (Twitter: @prudhommewtf). .LINK https://blog.prudhomme.wtf/powershell-wmi-querying-cdrom-informations #> [CmdletBinding()] Param( [String]$ComputerName = […]

PowerShell WMI – Querying System Informations

Hi Guys, Here is a small function I wrote to gather the System basic informations. [ps]Function Get-SystemInfo { <# .SYNOPSIS Query WMI of the system to provide basic system information. .PARAMETER ComputerName The computer name or IP of targeted computer. .NOTES Author: Thomas Prud’homme (Twitter: @prudhommewtf). .LINK https://blog.prudhomme.wtf/powershell-wmi-querying-system-informations #> [CmdletBinding()] Param( [String]$ComputerName = $env:COMPUTERNAME ) […]

PowerShell – Extend Get-Date with First and Last Day of the Week

Hi Guys, For script purpose I needed to have the information of the First and Last Day of the Week quickly and easily. I already added the old, but great, solution provided by the Scripting Guy to get the week number out of the Get-ExtendedDate function using: [ps]Get-Date -Date ’06/26/2017′ -UFormat %V[/ps] So I took […]

PowerShell WMI – Matching Function – OSLanguage codes

Hi guys, When you are querying WMI objects to find Operating System information you while face the OS Language codes. Those interger match with supported installation languages for Operating System. The list of interger and matching value is available on a MSDN Web page. I then write a PowerShell function to make the matching of […]

PowerShell WMI – Querying Operating System informations

Hi Guys, Here is a small function I wrote to gather the Operating System basic informations. [ps]Function Get-OSInfo { <# .SYNOPSIS Query WMI of the computer to provide basic OS Information. .PARAMETER ComputerName The computer name or IP of targeted computer. .NOTES Author: Thomas Prud’homme (Twitter: @prudhommewtf). .LINK https://blog.prudhomme.wtf/powershell-wmi-querying-operating-system-informations #> [CmdletBinding()] Param( [String]$ComputerName = $env:COMPUTERNAME […]