Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Change Time Zone...

Reply
 
Old 08-23-2007   #1 (permalink)
greatbarrier86


 
 

Change Time Zone...

Is there a way to change the time zone using WMI? Or any other powershell
method? I have a method that works for XP but not for vista, so i am kinda
stumped

My System SpecsSystem Spec
Old 08-23-2007   #2 (permalink)
Brandon Shell


 
 

Re: Change Time Zone...

You could use Win32_TimeZone, but not sure how exactly you would specify the
time zone.
Get-Wmiobject Win32_TimeZone

"greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in message
news:B583C0B2-B900-4D38-926D-1351590970D4@microsoft.com...
> Is there a way to change the time zone using WMI? Or any other powershell
> method? I have a method that works for XP but not for vista, so i am kinda
> stumped


My System SpecsSystem Spec
Old 08-23-2007   #3 (permalink)
Shay Levi


 
 

Re: Change Time Zone...

You can try to modify the registry keys under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation


Shay
http://scriptolog.blogspot.com



> Is there a way to change the time zone using WMI? Or any other
> powershell method? I have a method that works for XP but not for
> vista, so i am kinda stumped
>



My System SpecsSystem Spec
Old 08-23-2007   #4 (permalink)
Shay Levi


 
 

Re: Change Time Zone...

This is your lucky day

CONTROL.EXE TIMEDATE.CPL,,/Z Israel Standard Time

You can get a list of time zones for /Z under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones



Shay
http://scriptolog.blogspot.com



> You can try to modify the registry keys under
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformatio
> n
> Shay
> http://scriptolog.blogspot.com
>> Is there a way to change the time zone using WMI? Or any other
>> powershell method? I have a method that works for XP but not for
>> vista, so i am kinda stumped
>>



My System SpecsSystem Spec
Old 08-23-2007   #5 (permalink)
ebgreen


 
 

Re: Change Time Zone...

I checked msdn and I'm pretty sure that all the properties in Win32_TimeZone
are Read Only and the class does not expose any methods, so I think the
registry is probably the only option.

"Brandon Shell" wrote:

> You could use Win32_TimeZone, but not sure how exactly you would specify the
> time zone.
> Get-Wmiobject Win32_TimeZone
>
> "greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in message
> news:B583C0B2-B900-4D38-926D-1351590970D4@microsoft.com...
> > Is there a way to change the time zone using WMI? Or any other powershell
> > method? I have a method that works for XP but not for vista, so i am kinda
> > stumped

>
>

My System SpecsSystem Spec
Old 08-23-2007   #6 (permalink)
Brandon Shell


 
 

Re: Change Time Zone...

You are correct... but the wonderful powershell people added some script
methods. I havent tested them, but I thought they should work.

355# Get-WmiObject Win32_TimeZone | gm -MemberType Methods
TypeName: System.Management.ManagementObject#root\cimv2\Win32_TimeZone

Name MemberType Definition
---- ---------- ----------
ConvertFromDateTime ScriptMethod System.Object ConvertFromDateTime();
ConvertToDateTime ScriptMethod System.Object ConvertToDateTime();
Delete ScriptMethod System.Object Delete();
GetType ScriptMethod System.Object GetType();
Put ScriptMethod System.Object Put();

"ebgreen" <ebgreen@discussions.microsoft.com> wrote in message
news:579B55AB-C9ED-441A-8B37-C83471B6184A@microsoft.com...
>I checked msdn and I'm pretty sure that all the properties in
>Win32_TimeZone
> are Read Only and the class does not expose any methods, so I think the
> registry is probably the only option.
>
> "Brandon Shell" wrote:
>
>> You could use Win32_TimeZone, but not sure how exactly you would specify
>> the
>> time zone.
>> Get-Wmiobject Win32_TimeZone
>>
>> "greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in
>> message
>> news:B583C0B2-B900-4D38-926D-1351590970D4@microsoft.com...
>> > Is there a way to change the time zone using WMI? Or any other
>> > powershell
>> > method? I have a method that works for XP but not for vista, so i am
>> > kinda
>> > stumped

>>
>>


My System SpecsSystem Spec
Old 08-23-2007   #7 (permalink)
greatbarrier86


 
 

Re: Change Time Zone...

That doesnt seem to work for Vista. That just brings up the Adjust Time/Date
settings

"Shay Levi" wrote:

> This is your lucky day
>
> CONTROL.EXE TIMEDATE.CPL,,/Z Israel Standard Time
>
> You can get a list of time zones for /Z under
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
>
>
>
> Shay
> http://scriptolog.blogspot.com
>
>
>
> > You can try to modify the registry keys under
> > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformatio
> > n
> > Shay
> > http://scriptolog.blogspot.com
> >> Is there a way to change the time zone using WMI? Or any other
> >> powershell method? I have a method that works for XP but not for
> >> vista, so i am kinda stumped
> >>

>
>


My System SpecsSystem Spec
Old 08-23-2007   #8 (permalink)
ebgreen


 
 

Re: Change Time Zone...

Good point. Put() does look somewhat promising, but I would think that it
would get a little tricky unless the system is smart enough that you could
just change say the .SettingID property and it would be able to change all
the other values for you.

"Brandon Shell" wrote:

> You are correct... but the wonderful powershell people added some script
> methods. I havent tested them, but I thought they should work.
>
> 355# Get-WmiObject Win32_TimeZone | gm -MemberType Methods
> TypeName: System.Management.ManagementObject#root\cimv2\Win32_TimeZone
>
> Name MemberType Definition
> ---- ---------- ----------
> ConvertFromDateTime ScriptMethod System.Object ConvertFromDateTime();
> ConvertToDateTime ScriptMethod System.Object ConvertToDateTime();
> Delete ScriptMethod System.Object Delete();
> GetType ScriptMethod System.Object GetType();
> Put ScriptMethod System.Object Put();
>
> "ebgreen" <ebgreen@discussions.microsoft.com> wrote in message
> news:579B55AB-C9ED-441A-8B37-C83471B6184A@microsoft.com...
> >I checked msdn and I'm pretty sure that all the properties in
> >Win32_TimeZone
> > are Read Only and the class does not expose any methods, so I think the
> > registry is probably the only option.
> >
> > "Brandon Shell" wrote:
> >
> >> You could use Win32_TimeZone, but not sure how exactly you would specify
> >> the
> >> time zone.
> >> Get-Wmiobject Win32_TimeZone
> >>
> >> "greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in
> >> message
> >> news:B583C0B2-B900-4D38-926D-1351590970D4@microsoft.com...
> >> > Is there a way to change the time zone using WMI? Or any other
> >> > powershell
> >> > method? I have a method that works for XP but not for vista, so i am
> >> > kinda
> >> > stumped
> >>
> >>

>
>

My System SpecsSystem Spec
Old 08-24-2007   #9 (permalink)
Brandon Shell


 
 

Re: Change Time Zone...

Sorry GB... I was just showing the methods I was talking about.

Either way.. I think changing TZ would be difficult unless you had some
enumerator for each timezone.

"greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in message
news:3B81BEAA-2DA5-4533-ACE0-BDB080B0A382@microsoft.com...
> Good lord...woah...i'm not sure what to do with that.
>
> "Brandon Shell" wrote:
>
>> You are correct... but the wonderful powershell people added some script
>> methods. I havent tested them, but I thought they should work.
>>
>> 355# Get-WmiObject Win32_TimeZone | gm -MemberType Methods
>> TypeName: System.Management.ManagementObject#root\cimv2\Win32_TimeZone
>>
>> Name MemberType Definition
>> ---- ---------- ----------
>> ConvertFromDateTime ScriptMethod System.Object ConvertFromDateTime();
>> ConvertToDateTime ScriptMethod System.Object ConvertToDateTime();
>> Delete ScriptMethod System.Object Delete();
>> GetType ScriptMethod System.Object GetType();
>> Put ScriptMethod System.Object Put();
>>
>> "ebgreen" <ebgreen@discussions.microsoft.com> wrote in message
>> news:579B55AB-C9ED-441A-8B37-C83471B6184A@microsoft.com...
>> >I checked msdn and I'm pretty sure that all the properties in
>> >Win32_TimeZone
>> > are Read Only and the class does not expose any methods, so I think the
>> > registry is probably the only option.
>> >
>> > "Brandon Shell" wrote:
>> >
>> >> You could use Win32_TimeZone, but not sure how exactly you would
>> >> specify
>> >> the
>> >> time zone.
>> >> Get-Wmiobject Win32_TimeZone
>> >>
>> >> "greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in
>> >> message
>> >> news:B583C0B2-B900-4D38-926D-1351590970D4@microsoft.com...
>> >> > Is there a way to change the time zone using WMI? Or any other
>> >> > powershell
>> >> > method? I have a method that works for XP but not for vista, so i am
>> >> > kinda
>> >> > stumped
>> >>
>> >>

>>
>>


My System SpecsSystem Spec
Old 08-24-2007   #10 (permalink)
greatbarrier86


 
 

Re: Change Time Zone...

Brandon,

No worries. You've been so much help already with everything else. As have
many people here.

The thing is, that CONTROL.exe line works in windows xp, so there has to be
a vista equivalent. I'd be surprised if there wasnt.

"Brandon Shell" wrote:

> Sorry GB... I was just showing the methods I was talking about.
>
> Either way.. I think changing TZ would be difficult unless you had some
> enumerator for each timezone.
>
> "greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in message
> news:3B81BEAA-2DA5-4533-ACE0-BDB080B0A382@microsoft.com...
> > Good lord...woah...i'm not sure what to do with that.
> >
> > "Brandon Shell" wrote:
> >
> >> You are correct... but the wonderful powershell people added some script
> >> methods. I havent tested them, but I thought they should work.
> >>
> >> 355# Get-WmiObject Win32_TimeZone | gm -MemberType Methods
> >> TypeName: System.Management.ManagementObject#root\cimv2\Win32_TimeZone
> >>
> >> Name MemberType Definition
> >> ---- ---------- ----------
> >> ConvertFromDateTime ScriptMethod System.Object ConvertFromDateTime();
> >> ConvertToDateTime ScriptMethod System.Object ConvertToDateTime();
> >> Delete ScriptMethod System.Object Delete();
> >> GetType ScriptMethod System.Object GetType();
> >> Put ScriptMethod System.Object Put();
> >>
> >> "ebgreen" <ebgreen@discussions.microsoft.com> wrote in message
> >> news:579B55AB-C9ED-441A-8B37-C83471B6184A@microsoft.com...
> >> >I checked msdn and I'm pretty sure that all the properties in
> >> >Win32_TimeZone
> >> > are Read Only and the class does not expose any methods, so I think the
> >> > registry is probably the only option.
> >> >
> >> > "Brandon Shell" wrote:
> >> >
> >> >> You could use Win32_TimeZone, but not sure how exactly you would
> >> >> specify
> >> >> the
> >> >> time zone.
> >> >> Get-Wmiobject Win32_TimeZone
> >> >>
> >> >> "greatbarrier86" <greatbarrier86@discussions.microsoft.com> wrote in
> >> >> message
> >> >> news:B583C0B2-B900-4D38-926D-1351590970D4@microsoft.com...
> >> >> > Is there a way to change the time zone using WMI? Or any other
> >> >> > powershell
> >> >> > method? I have a method that works for XP but not for vista, so i am
> >> >> > kinda
> >> >> > stumped
> >> >>
> >> >>
> >>
> >>

>
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
change time zone using command General Discussion
Time Zone - Restore Missing Time Zones Tutorials
PC Time zone change .NET General
Changing the time zone changes the appointment time in calendar .NET General
How to change the Time Zone on VISTA from Command Line Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46