Skip to content

Commit

Permalink
added os_verison, os_build_version, os_build_number, os_architecture,…
Browse files Browse the repository at this point in the history
… os_edition, system_timezone, bitlocker_encryption_method, horizon_broker_url, horizon_protocol

Signed-off-by: Josue Negron <jnegron@vmware.com>
  • Loading branch information
josuenegron committed Nov 30, 2018
1 parent 05f88a4 commit 587c66b
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Windows-Samples/Sensors/README.md
@@ -1,8 +1,8 @@
# Workspace ONE Sensors

## Overview
- **Authors**:Bhavya Bandi, Varun Murthy, Josue Negron, Brooks Peppin
- **Email**: bbandi@vmware.com, vmurthy@vmware.com, jnegron@vmware.com, bpeppin@vmware.com
- **Authors**:Bhavya Bandi, Varun Murthy, Josue Negron, Brooks Peppin, Aaron Black, Mike Nelson
- **Email**: bbandi@vmware.com, vmurthy@vmware.com, jnegron@vmware.com, bpeppin@vmware.com, aaronb@vmware.com, miken@vmware.com
- **Date Created**: 11/14/2018
- **Supported Platforms**: Workspace ONE 1811
- **Tested on**: Windows 10 Pro/Enterprise 1803+
Expand All @@ -14,9 +14,10 @@ These Workspace ONE Sensor samples contain PowerShell command lines or scripts t
None

## Change Log
- 11/30/2018 - added os_verison, os_build_version, os_build_number, os_architecture, os_edition, system_timezone, bitlocker_encryption_method, horizon_broker_url, horizon_protocol
- 11/21/2018 - updated bios_secure_boot and bios_serial_number
- 11/15/2018 - changed echo to write-output in all samples
- 11/14/2018 - Uploaded README file

## Additional Resources
None
Coming Soon on [techzone.vmware.com](http://techzone.vmware.com)!
6 changes: 6 additions & 0 deletions Windows-Samples/Sensors/bitlocker_encryption_method.ps1
@@ -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
6 changes: 6 additions & 0 deletions Windows-Samples/Sensors/horizon_broker_url.ps1
@@ -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
6 changes: 6 additions & 0 deletions Windows-Samples/Sensors/horizon_protocol.ps1
@@ -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
5 changes: 5 additions & 0 deletions Windows-Samples/Sensors/os_architecture.ps1
@@ -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
5 changes: 5 additions & 0 deletions Windows-Samples/Sensors/os_build_number.ps1
@@ -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
5 changes: 5 additions & 0 deletions Windows-Samples/Sensors/os_build_version.ps1
@@ -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
5 changes: 5 additions & 0 deletions Windows-Samples/Sensors/os_edition.ps1
@@ -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
10 changes: 10 additions & 0 deletions Windows-Samples/Sensors/os_version.ps1
@@ -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
5 changes: 5 additions & 0 deletions Windows-Samples/Sensors/system_timezone.ps1
@@ -0,0 +1,5 @@
# Returns Time Zone
# Return Type: String
# Execution Context: User
$os=Get-TimeZone
write-host $os

0 comments on commit 587c66b

Please sign in to comment.