How to set the "No paging file" option within a powershell script RRS feed

  • Question

  • Hi All,

           I'm trying to script the "No paging file" option for the my c drive. Any ideas? 

    I've looked at the w32_pagefilesetting class but can see any option...I'm using the mix/max = 0 to set my page file to system managed on my d drive


    Set-WmiInstance Win32_PageFileSetting -Arguments @{Name='D:\pagefile.sys'; InitialSize=0; MaximumSize=0}
    Wednesday, June 5, 2019 6:35 PM

All replies

  • There's a script available that should help with this: https://gallery.technet.microsoft.com/scriptcenter/Script-to-configure-e8d85fee
    Wednesday, June 5, 2019 6:43 PM
  • Thanks =D
    Thursday, June 6, 2019 9:27 AM
  • Hi, did you succeed to find a way to set the "no paging file"? if yes, can you share your solution cause i'm not really good with powershell.
    Monday, November 2, 2020 6:03 PM