From elevated prompt :
wmic.exe computersystem set AutomaticManagedPagefile=False
wmic.exe pagefileset set InitialSize=2048,MaximumSize=2048
Scripts, oneliners and various technical articles
From elevated prompt :
wmic.exe computersystem set AutomaticManagedPagefile=False
wmic.exe pagefileset set InitialSize=2048,MaximumSize=2048