Skip to content

Commit

Permalink
Update Other.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
farag2 authored Sep 28, 2024
1 parent 0268408 commit 83e45d0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Other.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1235,3 +1235,20 @@ IsEven 5

# Bitlocker. Get-CimInstance has less properties
Get-WmiObject -namespace Root\cimv2\security\MicrosoftVolumeEncryption -ClassName Win32_Encryptablevolume

# Get real Windows version
# https://dennisbabkin.com/blog/?t=how-to-tell-the-real-version-of-windows-your-app-is-running-on
$Signature = @{
Namespace = "WinAPI"
Name = "Winbrand"
Language = "CSharp"
MemberDefinition = @"
[DllImport("Winbrand.dll", CharSet = CharSet.Unicode)]
public extern static string BrandingFormatString(string sFormat);
"@
}
if (-not ("WinAPI.Winbrand" -as [type]))
{
Add-Type @Signature
}
[WinAPI.Winbrand]::BrandingFormatString("%WINDOWS_LONG%")

0 comments on commit 83e45d0

Please sign in to comment.