PowerCLI: OSCustomizationSpec does not support any -Timezone option which is UTC/GMT

OSCustomizationSpec (New-OSCustomizationSpec, Set-OSCustomizationSpec, etc) does not allow you to select a GMT without DST (UTC) time zone .

The -Timezone option is defined as:

Specifies the name or ID of the time zone for a Windows guest OS only. Using wildcards is supported. The following time zones are available:

000 Int'l Dateline

001 Samoa

002 Hawaii

003 Alaskan

004 Pacific

010 Mountain (U.S. and Canada)

015 U.S. Mountain: Arizona

020 Central (U.S. and Canada)

025 Canada Central

030 Mexico

033 Central America

035 Eastern (U.S. and Canada)

040 U.S. Eastern: Indiana (East)

045 S.A. Pacific

050 Atlantic (Canada)

055 S.A. Western

056 Pacific S.A.

060 Newfoundland

065 E. South America

070 S.A. Eastern

073 Greenland

075 Mid-Atlantic

080 Azores

083 Cape Verde Islands

085 GMT (Greenwich Mean Time)

090 GMT Greenwich

095 Central Europe

100 Central European

105 Romance

110 W. Europe

113 W. Central Africa

115 E. Europe

120 Egypt

125 EET (Helsinki, Riga, Tallinn)

130 EET (Athens, Istanbul, Minsk)

135 Israel: Jerusalem

140 S. Africa: Harare, Pretoria

145 Russian

150 Arab

155 E. Africa

160 Iran

165 Arabian

170 Caucasus Pacific (U.S. and Canada)

175 Afghanistan

180 Russia Yekaterinburg

185 W. Asia

190 India

193 Nepal

195 Central Asia

200 Sri Lanka

201 N. Central Asia

203 Myanmar: Rangoon

205 S.E. Asia

207 N. Asia

210 China

215 Singapore

220 Taipei

225 W. Australia

227 N. Asia East

230 Korea: Seoul

235 Tokyo

240 Sakha Yakutsk

245 A.U.S. Central: Darwin

250 Central Australia

255 A.U.S. Eastern

260 E. Australia

265 Tasmania

270 Vladivostok

275 W. Pacific

280 Central Pacific

285 Fiji

290 New Zealand

300 Tonga

However neither 085 GMT (Greenwich Mean Time) nor 090 GMT Greenwich are actual GMT. They are GMT with DST or Greenwich Standard. So they cannot be used as UTC.

Microsoft also defines 360 as UTC for many applications and I suspect this could be used for this purpose is the PowerCLI & ESXi were updated to support it. However this is not the case as any command including code 360 will result in an error.

Is there a workaround for this? How can I ensure that the client customization on the VM is set to UTC regardless of the original original settings of the VM of which the template was made from?

Thanks in advance.

Best regards,


0 Kudos
1 Reply

This is an issue how vSphere handles customization of Windows guest OS, not a PowerCLI issue.

The only way around it afaik, is to simulate the functionality the vSphere guest customisation does.

In other words, manage and edit the unattend.xml yourself and make sure it is copied to the guest OS disk.

Derek did a great script on just such a procedure, see Automate Sysprep on vSphere w/o Custom Specs

It should at least give you an idea how to accomplish what you want to do.

Blog:  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos