Jump to content


jonrowe81

Renaming Computers based on subnet & serial number, need help

Recommended Posts

I have 5 sites that currently have 5 separate, identical task sequence...but one difference is there is a program one of my techs wrote that renames the computer to, for example, MPHS-SerialNumber.

 

Our sites are as follows:

 

MPHS-

MPJH-

MPES-

so forth and so on

 

Each site has their own gateway/subnet, and so if I was able to put this ALL into ONE task sequence that would be amazing.

 

If given this, how would you all do this? I know that I can add the scripting/program/etc for each site to the task sequence, and then under options apply a conditional WMI query based on the subnet/gateway the client resides in, but I don't know HOW to do this.

 

I've tried this:

 

Select * From Win32_NetworkAdapterConfiguration Where DefaultIPGateway="10.80.16.1"

 

And I get this error during the task sequence:

The task sequence execution engine failed evaluating the condition for the action (MPHS Rename) in the group (Site-Specific Renaming). Error code 4119. The operating system reported error 53: The network path was not found.

 

I'm at a loss for how to achieve this, but i know it's something simple i'm missing...or I just need to completely re-evalute how we're renaming these computers and do it differently...anyone out there generous enough to help me out with this task would be greatly appreciated!

 

Thanks so much!

 

Share this post


Link to post
Share on other sites

You could use the Microsoft Deployment Toolkit and put the whole logic for the naming into your custumsetting.ini file. The simply run a "use deplyoment toolit" followed by a "gather" step in your task sequnce.

 

Here is an example for the naming logic.

[Settings]
Priority=Default
Properties=MyLocation

[Default]
OSDComputerName=%MyLocation%-#Replace("#Left("%SERIALNUMBER%",10)#"," ","")#
Subsection=%DefaultGateway001%


[192.168.0.1]
MyLocation=MPHS

[192.168.1.1]
MyLocation=MPJH

Share this post


Link to post
Share on other sites

 

You could use the Microsoft Deployment Toolkit and put the whole logic for the naming into your custumsetting.ini file. The simply run a "use deplyoment toolit" followed by a "gather" step in your task sequnce.

 

Here is an example for the naming logic.

[Settings]
Priority=Default
Properties=MyLocation

[Default]
OSDComputerName=%MyLocation%-#Replace("#Left("%SERIALNUMBER%",10)#"," ","")#
Subsection=%DefaultGateway001%


[192.168.0.1]
MyLocation=MPHS

[192.168.1.1]
MyLocation=MPJH

This sounds like exactly what i'm looking at doing...i'm not familiar with using MDT / Deployment Toolkit, so i'm going to research that now. I know the logic as to how and why it works, just getting the files setup and doing it is another story...if you have any resources that might help in getting exactly what you're talking about doing (and understanding the logic of MDT and editing customsettings.ini) that'd be great.

 

Looking now, thanks again! (sorry i'm so basic on this, scripting/wmi/etc is not my strong point and this has helped tremendously in pointing me in the right direction)

Share this post


Link to post
Share on other sites

Well, the MDT itself has actually a pretty good build in help. Just search for customsettings.ini in the help topics.

 

post-10753-0-05394400-1406911079_thumb.jpg

 

 

Also you should not miss out the sites of Johan Arwidmark and Mikael Nystrom.

 

http://deploymentbunny.com/category/mdt/

 

http://www.deploymentresearch.com/Research.aspx?Search=customsettings.ini&SearchType=Keyword

 

These two guys know what they are talking about. If you ever get a chance to attend one of their training sessions, go for it.

 

Actually you can also watch some of their sessions online

 

http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014#fbid=

Share this post


Link to post
Share on other sites

Peter33,

 

I am working on my customsettings.ini now, anything stick out to you here?

 

[settings]
Priority=Default
Properties=MyLocation
[Default]
OSDComputerName=%MyLocation%-#Replace("#Left("%SERIALNUMBER%",10)#"," ","")#
Subsection=%DefaultGateway001%
[10.80.16.1]
MyLocation=MPHS
[10.100.100.1]
MyLocation=MPJH
[10.80.76.1]
MyLocation=MPCE
[10.80.84.1]
MyLocation=MPES
[10.80.40.1]
MyLocation=MPAD
[10.80.32.1]
MyLocation=MPWK
Another thing i'm noticing, I don't have a Toolkit Package. The only customsettings.ini file I found was in \server\SMSPKGSIG\MPS00032.2
I know i'm missing something very standard, just not sure what it is. I'm going to just start reading..it's great to be clueless ;)

Share this post


Link to post
Share on other sites

This looks fine and should work as you want.

 

In your SCCM you need to create two packages. One for MDT2013. This will be used when you run the "use toolkit package" step. Another one, the "Settings package", will only hold your customsettings.ini.

In the gather step you will refer to this package.

 

The easiest way to create the MDT package is to run the "new MDT Task sequence" wizard. This will guide you through all needed packages and gives you the opportunity to create them (MDT,USMT,Settings).

Share this post


Link to post
Share on other sites

Ok so I have my customsettings.ini file with nothing in it but what I copied/pasted here, and have created a toolkit package and a settings package, and have distributed the content to my DP.

 

I add the MDT toolkit step to my task sequence, and then add a gather step, and set "gather local data and process rules". I put in CustomSettings.ini for rules file and select my new settings package, click ok...

right click, click edit...it's set to Gather only local data (do not process rules)

 

It will not stay on Gather local data and process rules!

 

thoughts?

Share this post


Link to post
Share on other sites

Peter33: Tried viewing that link and it's not working. not sure what's up...

 

I'm looking more into this. I am selecting "Gather local data and process rules", then typing customsettings.ini in for my rules file, and browsing to the new settings package I created. When I click ok (apply is never available, stays grayed out), i then go back into edit of task sequence and it default back to "Gather only local data", I cannot get it to stay on "Gather local data and process rules" with my customsettings.ini listed

 

Am I missing something?

Share this post


Link to post
Share on other sites

OK, so I have fixed the issue for not being able to apply the settings for customsettings.ini and applying the settings package.

 

Again, the only things I have in my CustomSettings.ini is the following:

 

===========================================================================================================

[settings]
Priority=Default
Properties=MyLocation
[Default]
OSDComputerName=%MyLocation%-#Replace("#Left("%SERIALNUMBER%",10)#"," ","")#
Subsection=%DefaultGateway001%
[10.80.16.1]
MyLocation=MPHS
[10.100.100.1]
MyLocation=MPJH
[10.80.76.1]
MyLocation=MPCE
[10.80.84.1]
MyLocation=MPES
[10.80.40.1]
MyLocation=MPAD
[10.80.32.1]
MyLocation=MPWK

===========================================================================================================

Does this seem like all I would need for this, or am I missing anything from my customsettings.ini file?
You're awesome sir, I really appreciate your time

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

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.