en-US/about_Get-WindowsProductKey.help.txt
|
.EXTERNALHELP Get-WindowsProductKey-help.xml
.NOTES NAME: about_Get-WindowsProductKey .DESCRIPTION The Get-WindowsProductKey function retrieves Windows product key information from a local or remote computer. It uses WMI (via Get-CimInstance) to query the SoftwareLicensingService class for the OA3xOriginalProductKey and other related properties, as well as slmgr.vbs for activation status. Key features include: - Retrieves OEM product key if available. - Retrieves partial keys associated with the installation. - Checks and reports the current Windows activation status. - Supports querying local or remote computers. - Uses CIM/WMI for efficient communication. .PARAMETER ComputerName Specifies the name of the computer to query. Defaults to the local computer ($env:COMPUTERNAME). This parameter does not accept pipeline input by property name. .PARAMETER Credential Specifies user credentials for connecting to a remote computer. If querying a remote computer and this parameter is omitted, default credentials will be used. This parameter accepts objects generated by the Get-Credential cmdlet. .INPUTS None. You cannot pipe objects to Get-WindowsProductKey. .OUTPUTS System.Management.Automation.PSCustomObject. The function returns an object containing: - OEM Product Key (if available) - Partial Product Keys - Activation Status .EXAMPLE Get-WindowsProductKey Description: Retrieves the Windows product key information from the local computer. .EXAMPLE Get-WindowsProductKey -ComputerName 'RemotePC01' Description: Retrieves the Windows product key information from a remote computer named RemotePC01 using default credentials. .EXAMPLE $cred = Get-Credential Get-WindowsProductKey -ComputerName 'RemotePC02' -Credential $cred Description: Retrieves the Windows product key information from a remote computer named RemotePC02 using specific user credentials prompted by Get-Credential. .LINK [TechToolbox](https://github.com/dan-damit/TechToolbox) |