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 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 […]

PowerShell WMI – Matching Function – BIOS Characteristics

Hi Guys, When you are querying WMI objects to find BIOS informations you will face the BIOS Characteristics codes. Those interger match with supported features or enabled features. 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 the digits […]

PowerShell WMI – Querying BIOS informations

Hi Guys, I will start a small blog post serie with PowerShell functions I wrote that query WMI of remote computer. Here is the first function: [ps]Function Get-BIOSInfo { <# .SYNOPSIS Describe purpose of "Get-BIOSInfo" in 1-2 sentences. .DESCRIPTION Add a more complete description of what the function does. .PARAMETER ComputerName Describe parameter -ComputerName. .EXAMPLE […]

Exchange Online migration – Unable to update Active Directory information for the source mailbox at the end of the move.

Hi guys, During an Exchange On-Premises migration to Exchange Online you may encounter an error sayig: Error: MigrationMRSPermanentException: Warning: Unable to update Active Directory information for the source mailbox at the end of the move. Error details: An error occurred while updating a user object after the move operation. –> The type initializer for ???’Microsoft.Exchange.Configuration.Tasks.TaskLogger???’ […]

How to get the Krbtgt last password set value using powershell

Hello, For a script purpose I needed to have the date of the last password set of the Krbtgt account. To do so I wrote this PowerShell function: [ps] Function Get-ADKrbtgtPwdLastSet{ [CmdletBinding()] Param( [Parameter(Mandatory=$false, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, HelpMessage=’Name of the domain.’, Position=0)] [ValidateScript({Test-Connection -ComputerName $_ -Count 2 -Quiet})] [String]$DomainName = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name ) Begin{ } Process{ $RodcKrbtgtSearcher […]

Enable a named item in XAML with PowerShell

Hello, Here is a Function I wrote to enable a named item disabled by design or previously disabled. Function Enable-NamedItem { [CmdletBinding()] Param( [String[]]$Item, [Object]$Window = $Window ) foreach ($object in $Item) { $Window.$object.IsEnabled = $true } }