### Deferred Enrollment for Windows Devices via MSI Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskDeviceEnrollment This command installs the AirWatch agent using Msiexec.exe with parameters for deferred enrollment, silent installation, server details, and user authentication. It enables enrollment upon user login or specific triggers. ```batch Msiexec.exe /i airwatchAgent.msi /q DEFERENROLLMENT=Y ENROLL=Y SERVER=ds###awmdm.com LGName= USERNAME= PASSWORD= ASSIGNTOLOGGEDINUSER=Y ``` -------------------------------- ### Get Java Version using CMD in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Executes the `java -version` command in a new CMD process to retrieve the installed Java version. The output is captured and displayed as a string. This requires Java to be installed and accessible in the system's PATH. ```PowerShell $java_ver = cmd.exe /c "java -version" '2>&1' echo $java_ver ``` -------------------------------- ### Enroll Windows Devices with Provisioning Hub Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskDeviceEnrollment This command uses Msiexec.exe to install the AirWatch agent with the PROVISIONHUB parameter enabled, facilitating Windows device enrollment. ```batch Msiexec.exe /i airwatchagent.msi PROVISIONHUB=Y ``` -------------------------------- ### Silent Enrollment for Windows Devices via MSI Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskDeviceEnrollment This command performs a silent installation and enrollment of the AirWatch agent using Msiexec.exe. It requires server details, organization group, username, and password for automated device enrollment. ```batch AirwatchAgent.msi /q ENROLL=Y SERVER=ds###awmdm.com LGName= USERNAME= PASSWORD= ASSIGNTOLOGGEDINUSER=Y ``` -------------------------------- ### Get Current Date in ISO 8601 Format - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Gets the current date and formats it according to the ISO 8601 standard ('s' format specifier). This is useful for consistent date representation. ```powershell $date_current = get-Date -format s -DisplayHint Date echo $date_current ``` -------------------------------- ### Get BIOS Version - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the general BIOS version from the system. This script queries WMI for BIOS details. ```powershell $os = Get-WmiObject Win32_bios -ComputerName $env:computername -ea silentlycontinue echo $os.Version ``` -------------------------------- ### Get Average CPU Usage in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates and returns the average CPU load percentage for the system using WMI. This script requires no external dependencies and outputs an integer. ```PowerShell $cpu_usage= Get-WmiObject win32_processor | Select-Object -ExpandProperty LoadPercentage echo $cpu_usage ``` -------------------------------- ### Get BIOS Version using WMI in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the BIOS version from the Windows Management Instrumentation (WMI) for the local machine. Requires no external dependencies and returns a string. ```PowerShell $os = Get-WmiObject Win32_bios -ComputerName $env:computername -ea silentlycontinue echo $os.Version ``` -------------------------------- ### Get BIOS Status - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the status of the BIOS on the system. This script queries WMI for BIOS information. ```powershell $os = Get-WmiObject Win32_bios -ComputerName $env:computername -ea silentlycontinue echo $os.Status ``` -------------------------------- ### Get Active Power Management Profile in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves information about the currently active power management plan on the system using WMI. Requires Administrator privileges. ```PowerShell $plan = Get-WmiObject -Class win32_powerplan -Namespace root\cimv2\power -Filter "isActive='true'" echo $plan ``` -------------------------------- ### Get CPU Usage Percentage - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the current CPU usage percentage. This script queries WMI for processor load information. ```powershell $cpu_usage= Get-WmiObject win32_processor | Select-Object -ExpandProperty LoadPercentage echo $cpu_usage ``` -------------------------------- ### Get SMBIOS BIOS Version - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the version of the System Management BIOS (SMBIOS) BIOS. This script queries WMI for BIOS information. ```powershell $os = Get-WmiObject Win32_bios -ComputerName $env:computername -ea silentlycontinue echo $os.SMBIOSBIOSVersion ``` -------------------------------- ### Get BIOS Status using WMI in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the status of the BIOS from the Windows Management Instrumentation (WMI) for the local machine. Requires no external dependencies and returns a string representing the BIOS status. ```PowerShell $os = Get-WmiObject Win32_bios -ComputerName $env:computername -ea silentlycontinue echo $os.Status ``` -------------------------------- ### Get Average Process Memory Usage in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the combined average private memory (PM) and non-paged memory (NPM) usage for the 'chrome' process in kilobytes. Requires the 'chrome' process to be running. ```PowerShell $PM = get-process chrome |Measure-object -property PM -Average|Select-Object -ExpandProperty Average $NPM = get-process chrome |Measure-object -property NPM -Average|Select-Object -ExpandProperty Average echo [System.Math]::Round(($PM+$NPM)/1KB) ``` -------------------------------- ### Get Average Virtual Memory Usage in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the used virtual memory in kilobytes by subtracting free virtual memory from total virtual memory using WMI. Returns an integer. ```PowerShell $os = Get-WmiObject win32_OperatingSystem $used_memory = $os.totalvirtualmemorysize - $os.freevirtualmemory echo $used_memory ``` -------------------------------- ### Get BIOS Serial Number - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the serial number of the BIOS on the local computer. This script queries WMI for BIOS information and outputs the serial number. ```powershell $os=Get-WmiObject Win32_bios -ComputerName $env:computername -ea silentlycontinue echo $os.SerialNumber ``` -------------------------------- ### Get Average Network Usage in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the average network data transfer rate in bytes per second across all network interfaces using WMI. The output is rounded to the nearest integer. ```PowerShell $Total_bytes=Get-WmiObject -class Win32_PerfFormattedData_Tcpip_NetworkInterface |Measure-Object -property BytesTotalPersec -Average |Select-Object -ExpandProperty Average echo ([System.Math]::Round($Total_bytes)) ``` -------------------------------- ### Check if Wireless Network is Present in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Checks for the presence of a wireless network adapter on the system by querying WMI for network adapters with names starting with 'Wi-Fi'. Returns a boolean value. ```PowerShell $wireless = Get-WmiObject -class Win32_NetworkAdapter -filter "netconnectionid like 'Wi-Fi%'" if($wireless){echo $true} else {echo $false} ``` -------------------------------- ### Get Average Memory Usage in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the used physical memory in kilobytes by subtracting free memory from total visible memory using WMI. Returns an integer representing used memory. ```PowerShell $os = Get-WmiObject win32_OperatingSystem $used_memory = $os.totalvisiblememorysize - $os.freephysicalmemory echo $used_memory ``` -------------------------------- ### Get TPM Lockout Status - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Checks if the Trusted Platform Module (TPM) is currently in a lockout state. This script queries the TPM object and checks its 'LockedOut' property. ```powershell $obj = get-tpm echo $obj.LockedOut ``` -------------------------------- ### Get Average Network Bytes Total Per Second - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the average total bytes transferred per second across network interfaces. This script uses WMI and the Measure-Object cmdlet. ```powershell $Total_bytes=Get-WmiObject -class Win32_PerfFormattedData_Tcpip_NetworkInterface |Measure-Object -property BytesTotalPersec -Average |Select-Object -ExpandProperty Average echo ([System.Math]::Round($Total_bytes)) ``` -------------------------------- ### Get Operating System Time Zone - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the current operating system's time zone information. This script uses the Get-TimeZone cmdlet and outputs the result to the host. ```powershell $os=Get-TimeZone write-host $os ``` ```powershell $os=Get-TimeZone write-output $os ``` -------------------------------- ### Get TPM Lockout Heal Time - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the time remaining until the Trusted Platform Module (TPM) lockout is healed. This script queries the TPM object for the 'LockoutHealTime' property. ```powershell $tpm=get-tpm echo $tpm.LockoutHealTime ``` -------------------------------- ### Enroll Windows Devices via Command-Line Staging Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskDeviceEnrollment This command utilizes AWProcessCommands.exe to enroll a device with specified server, organization group, username, and password. It's used for staging enrollment scenarios. ```batch C:\Program Files (x86)\Airwatch\AgentUI\AWProcessCommands.exe enroll --SERVER https://ds1234.awmdm.com --OG MyOG --USERNAME staginguser --PASSWORD mypassword --ASSIGNTOLOGGEDINUSER ``` -------------------------------- ### List Active Network Interfaces in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the Name and InterfaceDescription of active physical network adapters on the system. Filters for adapters with a status of 'up'. ```PowerShell $properties = @('Name','InterfaceDescription') $physical_adapter = get-netadapter -physical | where status -eq "up" |select-object -Property $properties echo $physical_adapter ``` -------------------------------- ### Check if Secure Boot is Enabled in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Checks if Secure Boot is enabled on the system using the `Confirm-SecureBootUEFI` cmdlet. Returns 'true' if enabled, and 'false' if not enabled or if an error occurs (e.g., on non-UEFI systems). Requires Administrator privileges. ```PowerShell try { $bios=Confirm-SecureBootUEFI } catch { $false } echo $bios ``` -------------------------------- ### Calculate Chrome Memory Usage in KB - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the combined Paged Memory (PM) and Non-Paged Memory (NPM) usage for the 'chrome' process in kilobytes. It uses Get-Process and Measure-Object. ```powershell $PM = get-process chrome |Measure-object -property PM -Average|Select-Object -ExpandProperty Average $NPM = get-process chrome |Measure-object -property NPM -Average|Select-Object -ExpandProperty Average echo [System.Math]::Round(($PM+$NPM)/1KB) ``` -------------------------------- ### Check TPM Ready Status - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Checks if the Trusted Platform Module (TPM) is ready on the system. This script queries the TPM object and checks its 'TpmReady' property. ```powershell $obj = get-tpm echo $obj.TpmReady ``` -------------------------------- ### Check PowerShell Version in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the current PowerShell version (Major.Minor.Build.Revision) and formats it as a string. This script uses built-in PowerShell environment variables. ```PowerShell $x = $PSVersionTable.PSVersion echo "$($x.Major).$($x.Minor).$($x.Build).$($x.Revision)" ``` -------------------------------- ### Check SMBIOS Presence - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Determines if System Management BIOS (SMBIOS) information is present on the system. This script queries WMI for BIOS details. ```powershell $os = Get-WmiObject Win32_bios -ComputerName $env:computername -ea silentlycontinue echo $os.SMBIOSPresent ``` -------------------------------- ### Check Battery Max Capacity in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Retrieves the maximum capacity of the system's battery in milliwatt-hours (mWh) using WMI. It sums the 'FullChargedCapacity' property from the 'BatteryFullChargedCapacity' class. ```PowerShell $max_capacity = (Get-WmiObject -Class "BatteryFullChargedCapacity" -Namespace "ROOT\WMI").FullChargedCapacity | Measure-Object -Sum | Select-Object -ExpandProperty Sum echo $max_capacity ``` -------------------------------- ### Calculate Used Physical Memory - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the amount of used physical memory on the system. It queries WMI for total and free physical memory and subtracts them. ```powershell $os = Get-WmiObject win32_OperatingSystem $used_memory = $os.totalvisiblememorysize - $os.freephysicalmemory echo $used_memory ``` -------------------------------- ### Calculate Used Virtual Memory - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the amount of used virtual memory on the system. It queries WMI for total and free virtual memory and subtracts them. ```powershell $os = Get-WmiObject win32_OperatingSystem $used_memory = $os.totalvirtualmemorysize - $os.freevirtualmemory echo $used_memory ``` -------------------------------- ### Check if a Process is Running in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Determines if a process named 'chrome' is currently running on the system. Returns 'true' if the process is found, otherwise 'false'. ```PowerShell $chrome = Get-Process chrome -ea SilentlyContinue if($chrome){ echo $true } else{ echo $false } ``` -------------------------------- ### Check Battery Charging Status in PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Determines if the system's battery is currently charging. It checks the 'BatteryStatus' property from the Win32_Battery WMI class and compares it against a list of charging states. ```PowerShell $charge_status = (Get-CimInstance win32_battery).batterystatus $charging = @(2,6,7,8,9) if($charging -contains $charge_status[0] -or $charging -contains $charge_status[1] ) { echo "Charging" } else{ echo "Not Charging" } ``` -------------------------------- ### Check if Chrome Process is Running - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Checks if any process named 'chrome' is currently running on the system. It uses Get-Process with error handling and outputs a boolean value. ```powershell $chrome = Get-Process chrome -ea SilentlyContinue if($chrome){ echo $true } else{ echo $false } ``` -------------------------------- ### Calculate Average Battery Charge Remaining - PowerShell Source: https://docs.omnissa.com/nl-NL/bundle/Windows_Desktop_ManagementVSaaS/page/uemWindeskSensors Calculates the average estimated battery charge remaining on a Windows system. It uses WMI to query battery information and then calculates the average. ```powershell $battery_remain=(Get-WmiObject win32_battery).estimatedChargeRemaining | Measure-Object -Average | Select-Object -ExpandProperty Average echo $battery_remain ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.