You've successfully subscribed to Nuvotex Blog
Great! Next, complete checkout for full access to Nuvotex Blog
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.
It may happen to you that you're working on headless systems (or just use remote powershell, because you can) and you want to adjust the location of the pagefile.
Mostly, you'll do this using the UI on the advanced system settings page.
This works fine and is easy to use. Yet it's not that fast as you've to navigate through a ton of popups.
Just as most stuff on windows, the configuration is done using WMI under the hood and can therefore be accessed using scripting languages - in our case powershell.
Configure pagefile using powershell
Setting pagefile configuration using powershell involves accessing WMI to:
- Disable managed pagefile
- Remove current pagefile configuration
- Create a new pagefile configuration
The script looks as follows:
That's it already - as usual you need to reboot for these settings to apply.