Come posso impostare TimeZone utilizzando PowerShell, su un computer di destinazione di Windows Server 2008 R2?Come impostare TimeZone usando Powershell
14
A
risposta
20
Questo è come lo faccio in script di impostazione ... anche se la nostra infrastruttura dC sarebbe impostare questo quando la macchina si unisce al dominio comunque ... mi piace essere approfondita nel mio script :)
%windir%\system32\tzutil /s "Eastern Standard Time"
0
non ho di Windows a portata di mano per testare, ma ecco il post che suggerisce una soluzione:
Nota che accennano tzutil.exe
è disponibile in Windows 7 - potrebbe essere disponibile in WS 2008 R2?
+1
Se è disponibile in Win 7 è disponibile anche in Server 2k8 R2. Il contrario non è vero, però. – Joey
3
Problemi correlati
- 1. Come installare .MSI usando PowerShell
- 2. Come impostare la directory predefinita di PowerShell?
- 3. Concatenare file usando PowerShell
- 4. Codeigniter timezone impostazioni mysql
- 5. PHP Default Timezone Config
- 6. Java GregorianCalendar change TimeZone
- 7. NSDatePicker timezone stranezza
- 8. Come richiamare MSBuild da PowerShell usando l'operatore &?
- 9. Come impostare l'ID usando javascript?
- 10. TimeZone di Coordinate
- 11. Offset timezone Python errato?
- 12. Timezone iTunes Connect?
- 13. java timezone errato
- 14. Timezone Heroku Scheduler?
- 15. Elenco timezone PHP migliore
- 16. java.util.Date utilizza TimeZone?
- 17. PowerShell per impostare le autorizzazioni delle cartelle
- 18. Istruzione switch Powershell per impostare più variabili
- 19. Come inserire datetime con timezone in SQLite?
- 20. TimeZone predefinito con ActiveSupport (senza Rails)
- 21. Come impostare RequestConfiguration per richiesta usando RestTemplate?
- 22. Come impostare il "realm" usando PHP OAuth?
- 23. Come impostare orientation = landscape usando KnpSnappyBundle?
- 24. Come impostare la posizione superiore usando jquery
- 25. Trova il tempo in millisecondi usando Powershell?
- 26. Copia/trasferisci file usando PowerShell 2.0
- 27. Change timezone in Arshaw FullCalendar
- 28. Timezone Retrieval basato sulla posizione
- 29. Migrazione da TimeZone a DateTimeZone
- 30. Distribuisci alle funzioni di blu usando PowerShell
in realtà per Powershell rimuovi il% windir% \ system32 \ come PS non saprai come gestirlo ... potresti usare C: \ Windows \ System32 \ invece –
system32 è normalmente nel tuo percorso quindi non ne hai affatto bisogno . tzutil.exe funziona su qualsiasi macchina Windows predefinita (che ha l'applicazione in system32 :) – shufler
L'esatto equivalente di powershell è '&" $ env: windir \ system32 \ tzutil.exe "/ s" Eastern Standard Time "' ma d'accordo, non hai davvero bisogno di system32 – gregmac