Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Find and replace data

$
0
0

Hi,

I am using PowerShell to report on an SQL DB which works fine. However 1 particular value in the SQL table needs changing, this value is the computer MAC address (for example 00-11-22-33-44-55-66).  I need to change this value to the computers hostname (for example PC01).

I have a .csv / txt file which contains the mapping between the 2 values (for example 00-11-22-33-44-55-66, PC01).

I would appreciate any help on how I can replace this value.

I did think about exporting all the data from SQL to a 2nd .csv file but wasn't sure how to find and replace between the 2 files.

Thanks

Bill


Viewing all articles
Browse latest Browse all 2562

Trending Articles