Quantcast
Channel: Ivanti User Community: Message List - OS Deployment and Provisioning
Viewing all articles
Browse latest Browse all 3345

Template - using Powershell to alter unattend.xml

$
0
0

Hi guys,

 

I'm working in an international environment, thus I would like to automate the different regional settings during the installation process.

 

I can determine the language setting by the IP address, as each country has a specific IP range.

 

I made up a Powershell script that fills variables according to the IP range :

 

# This scripts assigns the regional settings according to the current IP address range

# Find local IP address

$localIpAddress=((ipconfig | findstr [0-9].\.)[0]).Split()[-1]

if ($localIpAddress -match "10.90") {$OSDInputLocale="040c:0000040c";$OSDSystemLocale="fr-FR";$OSDUserLocale="fr-FR";$OSDTimeZone="Romance Standard Time"}

# French settings

elseif ($localIpAddress -match "10.80.") {$OSDInputLocale="DE-de";$OSDSystemLocale="DE-de";$OSDUserLocale="DE-de";$OSDTimeZone="W. Europe Standard Time"}

# German settings

else {$OSDInputLocale="0409:00000409";$OSDSystemLocale="en-US";$OSDUserLocale="en-US";$OSDTimeZone="Eastern Standard Time"}

# US settings - these are the default settings if the IP range is not defined above

 

The script works fine. But now the question :

 

How do I get the variables in the unattend.xml during the provisioning process ? Do I have to run the script in the template or do I have to call it in the unattend.xml ?

 

In my unattend.xml I put the following :


-<settings pass="oobeSystem">

 

-<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

 

 

<InputLocale>%%OSDInputLocale%%</InputLocale>

 

 

<SystemLocale>%%OSDSystemLocale>%</SystemLocale>

 

 

<UserLocale>%%OSDUserLocale%%</UserLocale>

 

</component>


Is this correct ?

 

 

Thanks for your input !

 

Michael


Viewing all articles
Browse latest Browse all 3345

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>