Script to decode computer names

I am very new to PowerShell, but I have been learning. Recently I was wondering if it would be possible to take a txt file with a list of compute names using our naming convention and translate them for each line. What I mean is , if the first character in the name is an L its a laptop, if its a D its a desktop, if the second 3 characters are “ops” then it belongs to ops, if its “deb” it belongs to finance.

I was wanting the script to run and grab the name of the computer and output something like this
Lops504 laptop Ops serial 504
Lops313 laptop Ops serial 313
DDeb505 Desktop finance serial 505

thank you in advance

Yes it is possible to do that. What have you tried thus far? Please share the code that you are attempting. Sample data and expected output would also be appreciated. How would you want to handle computer names that did not match your naming convention (for whatever reason)?

let me work on it some and I will get back . it seems the best way might be a hash table, however I have never done such a thing so let me go learn about it.