PowerShell – Time Zone Examples

  Code.cpp   # MrNetTek # eddiejackson.net # 6/7/2021 # free for public use # free to claim as your own Clear-Host # LOCAL # Get Local Time $ThisTime = [System.DateTime]::Now if ([System.TimeZoneInfo]::Local.IsDaylightSavingTime($ThisTime)) { $Tzn = [System.TimeZoneInfo]::Local.DaylightName } else { $Tzn = [System.TimeZoneInfo]::Local.StandardName } # Display “Time in {0} zone: {1}” -f $Tzn, $ThisTime Write-Host Read More …

PowerShell – List BIOS Information

Code.cpp   # MrNetTek # eddiejackson.net # 6/6/2021 # free for public use # free to claim as your own Clear-Host $Computer = “.” $ColItems = Get-Wmiobject -class “Win32_BIOS” -namespace “root\CIMV2” -computername $Computer foreach ($objItem in $ColItems) { write-host “BIOS Characteristics: ” $objItem.BiosCharacteristics write-host “BIOS Version: ” $objItem.BIOSVersion write-host “Build Number: ” $objItem.BuildNumber write-host “Caption: Read More …

PowerShell – Scheduled Shutdown

  Code.cpp   # MrNetTek # eddiejackson.net # 6/1/2021 # free for public use # free to claim as your own $action = New-ScheduledTaskAction -Execute ‘Powershell.exe’ -Argument ‘-NoProfile -WindowStyle Hidden -command “& {stop-computer}”‘ $trigger = New-ScheduledTaskTrigger -Daily -At 9pm Register-ScheduledTask -Action $action -Trigger $trigger -TaskName “Shutdown” -Description “Daily shutdown” Maximize Window Copy Code     Read More …