Switch statement

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Switch statement

Post by jvierra »

Load the CSV globally. Place it outside of any event or function.

You should put the header in the CSV file. You don't need to specify the delimiter if it is a comma.

You can also do this in the "Load" event:

$global:csv = Import-Csv '\\remotepath\Get-AppsModelSwitch.csv'
User avatar
apowershelluser
Posts: 194
Last visit: Fri Mar 22, 2024 4:38 am
Answers: 2

Re: Switch statement

Post by apowershelluser »

So I just looked into this mxtrinidad

and two different models did not retrieve SystemFamily, SystemSKUNumber whereas the regkeys are created based off of SCCM ( which is what I've been told )

So using the regkey works perfectly for me

Unless there is some reason to use gwmi over remote registry
This topic is 6 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked