Forum Discussion
PaddyB
Sep 15, 2022Brass Contributor
PowerShell Script to read Product SKU
Hi Pro's 🙂 i fight now since hours to fix a script. my script check for each use the assigned Microsoft licenses and generate a screen output and a CSV... so far so good. the script generate...
VasilMichev
Sep 15, 2022MVP
You might want to change line 187 ($Skuprice = $Skuprice) to using an actual lookup 🙂
- PaddyBSep 15, 2022Brass ContributorHi Vasil
to be honest, i just playing around with PS. not so much deep knowledge. How i do the lookup you alk about?- VasilMichevSep 15, 2022MVPYou probably want something like this on said line:
$Sku_price = $Skuprice.Item("$LicenseItem")
Note I've also changed the variable name, as you will be overwriting the original hashtable otherwise. Thus, make sure to use $Sku_price for the output (line 201, etc)- PaddyBSep 16, 2022Brass ContributorHi Vasil
thanks for it - i will give it a try, first attempt was not successful. i had also almost the same "line" i will also try to find a way, to put the values from hash table 2 (SKU Price) to the hash table1 (SKU) as a 2nd value
need to dig here a bit and learn some basics 🙂