Advertisement
imjyb1008work

PowerShell Get Set TimeZone

Mar 24th, 2020
1,992
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 指令:
  2. Get-TimeZone
  3.  
  4. 描述:
  5. 取得電腦目前的時區
  6.  
  7. 範例:
  8. PS C:\> Get-TimeZone
  9.  
  10.  
  11. Id                         : Taipei Standard Time
  12. DisplayName                : (UTC+08:00) 台北
  13. StandardName               : 台北標準時間
  14. DaylightName               : 台北日光節約時間
  15. BaseUtcOffset              : 08:00:00
  16. SupportsDaylightSavingTime : False
  17.  
  18. ==========================================================
  19.  
  20. 指令
  21. Get-TimeZone -ListAvailable
  22.  
  23. 描述:
  24. 取得電腦目前所有可用的時區
  25.  
  26. 範例:
  27. PS C:\> Get-TimeZone -ListAvailable
  28.  
  29.  
  30. Id                         : Dateline Standard Time
  31. DisplayName                : (UTC-12:00) 國際換日線以西
  32. StandardName               : 國際換日線標準時間
  33. DaylightName               : 國際換日線日光節約時間
  34. BaseUtcOffset              : -12:00:00
  35. SupportsDaylightSavingTime : False
  36.  
  37. Id                         : UTC-11
  38. DisplayName                : (UTC-11:00) 國際標準時間-11
  39. StandardName               : UTC-11
  40. DaylightName               : UTC-11
  41. BaseUtcOffset              : -11:00:00
  42. SupportsDaylightSavingTime : False
  43.  
  44. Id                         : Hawaiian Standard Time
  45. DisplayName                : (UTC-10:00) 夏威夷
  46. StandardName               : 夏威夷標準時間
  47. DaylightName               : 夏威夷日光節約時間
  48. BaseUtcOffset              : -10:00:00
  49. SupportsDaylightSavingTime : False
  50.  
  51. Id                         : Aleutian Standard Time
  52. DisplayName                : (UTC-10:00) 阿留申群島
  53. StandardName               : 阿留申群島標準時間
  54. DaylightName               : 阿留申群島日光節約時間
  55. BaseUtcOffset              : -10:00:00
  56. SupportsDaylightSavingTime : True
  57. (以下省略)
  58.  
  59. ==========================================================
  60.  
  61. 指令:
  62. Set-TimeZone
  63.  
  64. 描述:
  65. 設定時區
  66.  
  67. 範例:
  68. Set-TimeZone -Id "Taipei Standard Time"
  69.  
  70. 如上指令會將時區更改為「台北標準時間」
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement