unatended naming of computers


i beginner in power shell , trying automatically name computer name.cvs file.

what have is two columns says serial number & 1 says computer name.

what want end result find serial number of one of the computers , in name.csv file serial number (in column serial number) and give name corresponds serial number in (name column). can 1 give me example of how write in power shell?

any appreciated.

james i.

hi james,

sorry delay. assume want computername based on "serial#", can refer powershell script below, point need use cmdlet import-csv load data powershell and where-object filter result:

import-csv d:\name.csv|where {$_."serial#" -eq "678910"}  import-csv d:\name.csv|where {$_."serial#" -eq "678910"}|select-object -expandproperty "computer name"  

if there else regarding issue, please feel free post back.

best regards,

anna wang



please remember mark replies answers if , unmark them if provide no help. if have feedback technet support, contact tnmff@microsoft.com



Windows Server  >  Setup Deployment



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

difference between wuauclt1.exe and wuauclt.exe

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL