Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Monday, January 7, 2019

Powershell – Getting device driver version

Here’s a quick tip to get a list of device driver version installed:

  • Open Powershell (as Administrator)
  • Execute the following command:
    Get-WmiObject Win32_PnPSignedDriver | select DeviceName, Manufacturer, DriverVersion

After executing the command, you’lll get something like this, where the third column displays the driver version:
Untitled

Monday, December 11, 2017

Tips & Tricks – Import/Export Windows Firewall Settings Command-Line

Here’s a nice tip for those that for some reason need to configure Windows Firewall (or Windows Defender Firewall on Windows 10).

The recommended way to do this should be using a group policy but because you may have a non-domain joined machine on your network, here’s how to do it.

  1. First of all, configure everything you need in Windows Firewall on a reference machine
  2. Then, open an elevated command-prompt and type the following command:
    netsh advfirewall export “C:\Temp\WindowsFirewallRules.wfw”

    advfirewall01
  3. Now that you have the file, you can import it to any machine using the following command:
    netsh advfirewall import “C:\Temp\WindowsFirewallRules.wfw”

    advfirewall02

If for any reason you need to reset firewall rules to default values just type:
netsh advfirewall reset



Tuesday, September 12, 2017

Powershell Tips – Get Users and Group from a GPO Security Filtering

image

Using security filtering on GPOs it’s a nice way to apply a GPO to specific groups or users.
But you may find yourself a little bit lost if you need to know every user or group you have configured.

Since Group Policy Management doesn’t allow you to export the users and groups, you’ll need to use a Powershell command to do it.

Here’s how:
Get-GPPermission –Name ‘GPO NAME’ -All | Where Permission –eq GpoApply

And…you’re done!