This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-WindowsLicenseStatus { | |
$Filter = "Name like 'Windows%' and PartialProductKey like '%'" | |
$LicenseStatus = (Get-CimInstance SoftwareLicensingProduct -Filter $Filter -Property LicenseStatus).LicenseStatus | |
return "LicenseStatus=${LicenseStatus}" | |
} | |
$exp1 = {Get-WindowsLicenseStatus} | |
$exp2 = {Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" | where { $_.PartialProductKey } | select -ExpandProperty LicenseStatus | Write-Host} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Available colors | |
# DarkBlue | DarkGreen | DarkCyan | DarkRed | DarkMagenta | DarkYellow |DarkGray | |
# Blue | Green | Cyan | Red | Magenta | Yellow | White | Gray | Black | |
# Main Colors | |
$host.UI.RawUI.ForegroundColor = 'White' | |
$host.UI.RawUI.BackgroundColor = 'DarkGray' | |