Advertisement
easternnl

Advanced Registry query & edit with Powershell

May 8th, 2015
713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # what does this sophasticated little powershell script do?
  2. #
  3. # 1. Query the Control Class in the registry for the network adapters (which is the Guid {4d36e972-e325-11ce-bfc1-08002be10318} )
  4. # 2. Query all the sub-folders (0001 - end)
  5. # 3. In the sub-folders a key exist with DriverDesc
  6. # 4. Set the characteristics to 9 (means the adapter will be visible in Windows Network and Sharing Centre, and the firewall profiles will be published.
  7. #
  8. # Thats it!
  9. ls -path "HKLM:\system\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}" -ErrorAction SilentlyContinue | Get-ItemProperty  -ErrorActionSilentlyContinue | where { $_.DriverDesc -eq "Check Point Virtual Network Adapter For Endpoint VPN Client" } | Set-ItemProperty -Name "Characteristics" -Value "9"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement