Search found 7 matches

by PS12018
Tue Jun 26, 2018 8:13 am
Forum: PowerShell
Topic: Reg Value
Replies: 10
Views: 3105

Re: Reg Value

I think you need to start by learning basic PowerShell. Without some training all of this will seem quite impossible. if('Windows xp' -eq (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductName).ProductName){ Calc }else{ notepad } So what your saying is.... it...
by PS12018
Tue Jun 26, 2018 6:01 am
Forum: PowerShell
Topic: Reg Value
Replies: 10
Views: 3105

Re: Reg Value

jvierra wrote: Mon Jun 25, 2018 1:32 pm Are you trying to do this?

Get-ItemProperty 'HKLM:\software\Microsoft\Windows NT\CurrentVersion\' -Name ProductName
This was the first thing I tried and wasn't getting the results I needed
by PS12018
Tue Jun 26, 2018 5:59 am
Forum: PowerShell
Topic: Reg Value
Replies: 10
Views: 3105

Re: Reg Value

Thanks for the reply. I tried it and still the same results, I may be missing something. Below is the script I am using to test it. I am on an XP system so Calc should start. $VersionInfo = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" -Name "ProductName...
by PS12018
Mon Jun 25, 2018 12:11 pm
Forum: PowerShell
Topic: Reg Value
Replies: 10
Views: 3105

Re: Reg Value

I am trying to query the Registry Data value. Within a Registry key. For example Hkey_local_machine\software\Microsoft\window NT\CurrentVersion: you will find a Reg key name Productname with the Data Value of your OS version(window XP , window 7, etc.). I would like to read that value against an If ...
by PS12018
Mon Jun 25, 2018 9:29 am
Forum: PowerShell
Topic: Reg Value
Replies: 10
Views: 3105

Re: Reg Value

Thanks for the reply...
I made the switch, but it still results in the "else" when it shouldn't. any ideas?


$val = Get-ItemProperty -path $reg -name Productname

$win = "Windows xp"

if ($val -eq $win)
......
else
.......
by PS12018
Mon Jun 25, 2018 5:57 am
Forum: PowerShell
Topic: Reg Value
Replies: 10
Views: 3105

Reg Value

I am trying to write a script the would read the value of a Reg key, but I cant seem to get it to work correctly. Any help is appreciated. The key I would like to read. Productname Windows xp $val = Get-Item -path $reg | select-object -expandproperty Productname $win = "Windows xp" if ($va...
by PS12018
Fri May 25, 2018 10:57 am
Forum: PowerShell
Topic: AD new user
Replies: 1
Views: 1358

AD new user

Hello all, I am trying to create a form that would allow a user to enter in just the Domain on which AD is associated with, then click a button and the per-determine information I have scripted would fill in when the user account was made in AD. The first issue I ran into is that Power studio doesn'...