Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added os_verison, os_build_version, os_build_number, os_architecture,…
… os_edition, system_timezone, bitlocker_encryption_method, horizon_broker_url, horizon_protocol Signed-off-by: Josue Negron <jnegron@vmware.com>
- Loading branch information
1 parent
05f88a4
commit 587c66b
Showing
10 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Returns Encryption Method for a BitLocker drive | ||
# Only returns information for C: | ||
# Return Type: String | ||
# Execution Context: System | ||
$EncryptionMethod = (Get-BitLockerVolume -MountPoint C).EncryptionMethod | ||
write-output $EncryptionMethod |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Returns Horizon Broker URL from Horizon Volatile Registry Key | ||
# Return Type: String | ||
# Execution Type: User | ||
$registryKey = Get-ItemProperty -Path "HKCU:\Volatile Environment\1" | ||
$value = $RegistryKey.ViewClient_Broker_URL | ||
write-output $value |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Returns Horizon protocol information from Horizon Volatile Registry Key | ||
# Return Type: String | ||
# Execution Type: User | ||
$registryKey = Get-ItemProperty -Path "HKCU:\Volatile Environment\1" | ||
$value = $RegistryKey.ViewClient_Protocol | ||
write-output $value |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Returns OS Architecture (32-bit or 64-bit) | ||
# Return Type: String | ||
# Execution Context: User | ||
$os=(Get-WmiObject Win32_OperatingSystem) | ||
write-host $os.OSArchitecture |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Returns build number e.g. 17134 | ||
# Return Type: String | ||
# Execution Context: User | ||
$os=Get-WmiObject Win32_OperatingSystem | ||
write-host $os.BuildNumber |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Returns windows 10 version e.g. 1803 | ||
# Return Type: String | ||
# Execution Context: User | ||
$os=Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | ||
write-host $os.ReleaseId |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Returns Windows 10 Edition (e.g. Enterprise, Education, Home, Professional) | ||
# Return Type: String | ||
# Execution Context: Admin | ||
$os=Get-WindowsEdition -online | ||
write-host $os.Edition |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Returns windows 10 version Major.Minor.Build.Revision (e.g. 10.0.17134 .407) | ||
# Return Type: String | ||
# Execution Context: User | ||
$WinVer = New-Object -TypeName PSObject | ||
$WinVer | Add-Member -MemberType NoteProperty -Name Major -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentMajorVersionNumber).CurrentMajorVersionNumber | ||
$WinVer | Add-Member -MemberType NoteProperty -Name Minor -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentMinorVersionNumber).CurrentMinorVersionNumber | ||
$WinVer | Add-Member -MemberType NoteProperty -Name Build -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentBuild).CurrentBuild | ||
$WinVer | Add-Member -MemberType NoteProperty -Name Revision -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' UBR).UBR | ||
$WinVer=$WinVer.Major.ToString() + "." + $WinVer.Minor.ToString() + "." + $WinVer.Build.ToString() + "." + $WinVer.Revision.ToString() | ||
write-host $WinVer |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Returns Time Zone | ||
# Return Type: String | ||
# Execution Context: User | ||
$os=Get-TimeZone | ||
write-host $os |