function Ini-DynamicTimeZoneInformation($arg_Year,$arg_TimeZoneInformation) { $F_TimeZone = $TimeZones.OpenSubKey($arg_TimeZoneInformation.standardName) $F_DynamicTimeZone = $F_TimeZone.OpenSubKey("Dynamic DST") if( [array]::IndexOf($F_DynamicTimeZone.GetValueNames(),$arg_Year) -ne -1...
Get-CimInstance-ClassNameWin32_Desktop 输出 SettingID Name ScreenSaverActive ScreenSaverSecure ScreenSaverTimeout --- --- --- --- --- NT AUTHORITY\SYSTEM False DESKTOP-CSSMBDR\Admin False .DEFAULT False 2.列出BIOS信息 命令 Get-CimInstance-ClassNameWin32_BIOS 输出 SMBIOSBIOSVersion : VMW71.00V.2...
$SYSTEMTIME = 1 |select wYear,wMonth,wDayOfWeek,wDay,wHour,wMinute,wSecond,wMilliseconds,Name Add-Member -InputObject $SYSTEMTIME -MemberType ScriptMethod Ini{ $index = $arg_startIndex $this.wYear = [BitConverter]::ToInt16($arg_tzi, $index) $this.wMonth = [BitConverter]::ToInt16($arg...
Get-Location Get-Process Get-PSDrive Get-PSProvider Get-Service Get-TimeZone Invoke-Item Join-Path Move-Item Move-ItemProperty New-Item New-ItemProperty New-PSDrive New-Service Pop-Location Push-Location Remove-Item Remove-ItemProperty Remove-PSDrive ...
Last part of the loop increments $index by 1 and $num by 2 (moves to next time zone name).The module contains 3 functions.Get-CurrentTimezone displays the current time zone information.The code for this is:The collection is piped into Where-Object with a filter to test the value of ...
CSDVersion {get;} CSName Property string CSName {get;} CurrentTimeZone Property int16 CurrentTimeZone {get;} DataExecutionPrevention_32BitApplications Property bool DataExecutionPrevention_32BitApplications {get;} DataExecutionPrevention_Available Property bool DataExecutionPrevention_Availabl...
Get-ComputerInfo Get-Content Get-HotFix Get-Item Get-ItemProperty Get-ItemPropertyValue Get-Location Get-Process Get-PSDrive Get-PSProvider Get-Service Get-TimeZone Invoke-Item Join-Path Move-Item Move-ItemProperty New-Item New-ItemProperty New-PSDrive New-Service Pop-Location Push-Location Remove-Item...
list-timezone.ps1 Lists the current time zone details. More » list-timezones.ps1 Lists all time zones available. More » list-user-groups.ps1 Lists the user groups on the local computer. More » poweroff.ps1 Halts the local computer (needs admin rights). More » query-smart-data....
$currentDateTime=Get-Date $formattedDateTime=$current▌teTime.ToString('yyyy-MM-dd HH:mm:ss')Write-Output $formattedDateTime 解析日期和时间字符串 使用ParseExact()或TryParseExact()方法将日期和时间字符串解析为DateTime对象: 代码语言:javascript
html Function Convert-FromUnixDate ($UnixDate) { [timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds($UnixDate)) } #$OutputEncoding = New-Object -typename System.Text.UTF8Encoding #[console]::outputencoding=[system.text.encoding]::utf8 #Write-Host("请将本脚本在 ...