Reg Value

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
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.
User avatar
PS12018
Posts: 7
Joined: Tue Apr 24, 2018 7:57 am

Re: Reg Value

Post by PS12018 » Tue Jun 26, 2018 8:13 am

jvierra wrote:
Tue Jun 26, 2018 6:50 am
I think you need to start by learning basic PowerShell. Without some training all of this will seem quite impossible.

Code: Select all

if('Windows xp' -eq (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductName).ProductName){
    Calc
}else{
    notepad
}
So what your saying is.... its better not to use an Array in a situation like this, but instead address it as a conditional expression within the if statement... Got it!! thank for you help. have a good day

Locked