Chirag Nagrekar has Published 465 Articles

How to get pagefile settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 05-Oct-2020 11:32:59

7K+ Views

Pagefile also Known as Virtual Memory file in the Windows Operating system is a very useful part of the OS. It helps to reduce the burden on the Physical memory by storing some paging file in the file call Pagefile.sys. Generally, this file in windows OS is stored in C:\ ... Read More

How to get hidden files and folders using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 05-Oct-2020 11:29:24

11K+ Views

To get hidden files and folders using PowerShell, we need to use the Get-ChildItem command with the - Hidden or -Force parameter.The difference between the two mentioned parameters is Hidden parameter only retrieves the hidden files and folders while the Force parameter retrieves all the files and folders including Hidden, ... Read More

How to remove pagefile on the specific drive using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 05-Oct-2020 11:22:57

2K+ Views

In this article, we have a pagefile set on E: (System managed) and we need to remove the pagefile from E: So in the below image once we remove it, the pagefile should be “No Paging File”.To do so using PowerShell, we need to filter the pagefile on a specific ... Read More

How to change pagefile settings from custom to system managed using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 05-Oct-2020 11:20:44

530 Views

To change the pagefile settings to system managed, we need to set InitialSize and MaximumSize parameters to 0. In the below example, we have E: has custom pagefile, not system managed and we need to convert it to the system managed.$pagefileset = Gwmi win32_pagefilesetting | where{$_.caption -like 'E:*'} $pagefileset.InitialSize = ... Read More

How to change Pagefile settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 05-Oct-2020 11:18:47

8K+ Views

To change the pagefile settings, we will divide this into multiple sections. First, when Pagefile is automatically managed, we can’t modify the settings so we need to remove that box. In GUI that box can be unchecked in Virtual memory settings.Code to uncheck the above box.$pagefile = Get-WmiObject Win32_ComputerSystem -EnableAllPrivileges ... Read More

How to disable windows firewall profiles using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 28-Sep-2020 08:37:52

962 Views

There are 3 types of profiles that firewall supports. a) Domain b) Public and c) Private profile. You can check the same settings using the GUI in the Windows Firewall Advanced Security settings window as shown below.You can check the above settings using the Get-NetFirewallProfile command.Get-NetFirewallProfile | Select Name, Enabled ... Read More

How to get windows firewall profile settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 28-Sep-2020 08:28:11

2K+ Views

Recent windows client and server operating systems like Windows 10, Windows Server 2008 onwards, supports advanced firewall versions and they have mainly 3 profiles.DomainPublicPrivate profile.To get the setting using GUI, you need to search in the box Windows Firewall with Advanced Security or Windows Defender Firewall with Advanced Security. Then ... Read More

How to check if remote ports are open using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 28-Sep-2020 08:21:45

6K+ Views

Earlier days we were using telnet clients to check the remote port connectivity, in fact, we are still using it with cmd and PowerShell but this feature is not by default installed in OS and some companies have restrictions on installing new features including telnet.We can leverage PowerShell to test ... Read More

How to Copy NTFS permissions using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 28-Sep-2020 08:17:32

8K+ Views

To change, add or remove security permissions on the files or folder using PowerShell you can use the Set-Acl command. The best way to set the permission is to copy the permissions from another file or folder if you need the same permissions on the destination path.For example, I want ... Read More

How to view folder NTFS permission with PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 28-Sep-2020 08:10:15

3K+ Views

To view the NTFS permission with PowerShell, we use the Get-ACL command. This command is supported in PowerShell version 5.1 or later. Generally how we get the security permission of the folder in the Windows OS using GUI, To get the same permissions shown above using PowerShell, use the below ... Read More

Advertisements