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 – 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 – Mapping function for Office 365 ServicePlans to ServicePlansId

Hi guys, If you are starting to work with the new Office 365 PowerShell module to manage users you might have found a disturbing change in the license affectation process. The DisabledPlans option, it is no more using the ServicePlan name but the ServicePlanId Guid. From an administrator point of view, this change is a […]

PowerShell Function – Test Server TCP Ports

Hi Guys, Here is a PowerShell Function I wrote couple of years ago. The purpose of this PowerShell function was to test if the given TCP ports where opened or not on specified computers. We needed this kind of function to keep tracks of customer network teams work, which was taking to long to open […]