Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to execute an action based on registry values?
- $rKey="hklm:SOFTWAREWow6432NodeMycompanyMyProjCore"
- DBServer="Installed"
- AppServer="Installed"
- WebServer="Installed"
- if DBserver="Installed" Then do some action
- Else Do nothing
- If Appserver="Installe" then do some action
- Else Do nothing
- If Webserver ="Installed" then do some action
- Else Do nothing
- $p = Get-ItemProperty $key
- if($p.DBserver -eq "Installed")
- {
- .. do some action ..
- }
- if($p.Appserver-eq "Installed")
- {
- .. do some action ..
- }
- if($p.Webserver -eq "Installed")
- {
- .. do some action ..
- }
Advertisement
Add Comment
Please, Sign In to add comment