print message if no battery detected
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# Exit this script if the current device doesn't have a built-in battery
|
# Exit this script if the current device doesn't have a built-in battery
|
||||||
If ( $null -eq (Get-CimInstance -ClassName Win32_Battery -ErrorAction SilentlyContinue) ) { Exit }
|
If ( $null -eq (Get-CimInstance -ClassName Win32_Battery -ErrorAction SilentlyContinue) ) { Microsoft.Powershell.Utility\Write-Output "This endpoint does not have a battery" ; Exit }
|
||||||
|
|
||||||
# Define file paths
|
# Define file paths
|
||||||
$Today = Get-LongDate
|
$Today = Get-LongDate
|
||||||
|
|||||||
Reference in New Issue
Block a user