Posts

How to Create a Firewall Rule Using PowerShell.

Image
In this tutorial, we will create a new inbound or outbound firewall rule and adds                                              the rule to the target computer. PS C:\WINDOWS\system32> New-NetFirewallRule cmdlet New-NetFirewallRule at command pipeline position 1 Supply values for the following parameters: DisplayName: This will update the display name of the firewall.  Now, we will update the powershell command with complete details.   New-NetFirewallRule -DisplayName "Block Outbound Port 80" You can run in your Windows 10 machine for checking the firewall. You will find the below FIREWALL window with Display name present. Congratulations😊 you have created your firewall rule.

How to do System Diagnostics

Image
 In this tutorial, we will actually work on the system diagnostics process used by powershell. PS C:\WINDOWS\system32> Get-Process | Get-Member Here , Pipe(|) in PowerShell stands for pipeline. This cmdlets helps combine one command to get the command of other cmdlet. You can do Get-Help if you got stuck in figuring out any command. 1.For example: I want to format the data associated with domain(more.com) then I can show it in list format in PowerShell  PS C:\WINDOWS\system32> Get-Command more* | format-list 2.For eg: Suppose I am connected to the internet so I want to find out the network connection through which I am getting the internet. A question❔ comes in my mind👨, how to achieve using PowerShell. Please comment in to make this blog more interactive and learning positive.

How to find the number of running process in my local machine.

Image
 In this post, we will let you know how to find the number of process running in windows machine using POWERSHELL. Go to Start in Windows 10 and type PowerShell with 'Run as administrator' .    PS C:\WINDOWS\system32> Get-Process We can find the below attributes which tells the number of process consumption in windows machine. Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName Now, we will move further and look into more PowerShell command. If you stuck while knowing any command then you can easily type the below command in powershell window. Get-Command Now, I want to find the number of DRIVES in my local system. Its very simple.😊 Get-PSDrive It will list all the drives in my local windows machine as you can see above.