Bit of background, I have just taken over managing a site from another IT worker who has moved on, the issue is he deleted all of his self made scripts, I have recreated a lot of them but I am having issue with one very important script.
We have a CSV file that lists all the PC names in each column in excel that are currently active, this CSV file also has other fields of entry that go across the row based on the PC name:
The CSV info looks like this (sample not all of the CSV data (I have manually put in commas so it is easier to tell each row apart for the example))
11067DEDSTS, BDG - Bridgewater, Back Office, 11067DEDSTS, BW4 505, BWT80
11100DEDSTS, HNV - Huonville Cashier, 11101DEDSTS, HV3 583 HUO11
10373HPSTS DPT - Devonport RM 10376HPSTS DE1 170 DPT30
This state’s all the useful information for the machine
What I need is some of the values extracted out and the those values either to a file (or pref to a registry entry) based solely on the machine name the PC and it matching up to the PC name in the first row entry
(I’ll explain better if I can)
PC name, 11067DEDSTS,
Location, BDG - Bridgewater,
Class, Back Office,
Server PC for site, 11067DEDSTS,
Till Location, BWT80
What I need is if the PC name of the actual PC matches any of the entry (EG the PC name matches the one from the line above) I need to output the Till and Till location to specific spots in the registry (or just to notepad files and I can do the rest) and if the PC name doesn't match one in the list is does nothing.
Please let me know if you need more info but I would appreciate the help the old admin left me in a massive bind.
EDITED: hopefully to make the description of what each value is easier to read.