Page 2 of 2

Re: Reg Value

Posted: Tue Jun 26, 2018 8:13 am
by PS12018
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