I am looking for a good way to run a script in powershell, to detect my site from an XML. We are currently using MDT to do this, but we cannot be completely automated due to the fact that we often build our machines on a central site and ship them out. This this end, I am putting together an XML file to pull the default settings as below. I'm happy with the 2nd (locale)section and how I can use it, I'm not sure how to approach the first section, pulling the gateway out and assigning the 3 letter site code. We have a lot of subnets of each site, so if I can list all the subnets, then assign the site code, that's how I would do it.
This is my Powershell script. Obviously, I've trimmed it back to just echo the results od the OSDSystemLocale to the console before creating my full-on Task Sequence script:
Any tips on how I could/should do this? I'm deliberately trying to avoid the MDT database, due to the amount of manual changes we end up performing on it. I have a feeling I may end up falling back on it for the site detection at least. I'm just trying to automate as much as I can, but still give the tech a time limited option with a posh script to select an alternative site.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hi
I am looking for a good way to run a script in powershell, to detect my site from an XML. We are currently using MDT to do this, but we cannot be completely automated due to the fact that we often build our machines on a central site and ship them out. This this end, I am putting together an XML file to pull the default settings as below. I'm happy with the 2nd (locale)section and how I can use it, I'm not sure how to approach the first section, pulling the gateway out and assigning the 3 letter site code. We have a lot of subnets of each site, so if I can list all the subnets, then assign the site code, that's how I would do it.
My XML file:
This is my Powershell script. Obviously, I've trimmed it back to just echo the results od the OSDSystemLocale to the console before creating my full-on Task Sequence script:
Any tips on how I could/should do this? I'm deliberately trying to avoid the MDT database, due to the amount of manual changes we end up performing on it. I have a feeling I may end up falling back on it for the site detection at least. I'm just trying to automate as much as I can, but still give the tech a time limited option with a posh script to select an alternative site.
Thanks
Con
Share this post
Link to post
Share on other sites