
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Change Pagefile Settings from Custom to System Managed using PowerShell
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 = 0 $pagefileset.MaximumSize = 0 $pagefileset.Put() | Out-Null
Now when you check the pagefile setting on E: it should be System managed.
To change the settings on the remote computer use -ComputerName parameter in the Get-WmiObject method.
Advertisements