dbatools is a free PowerShell module with over 180 SQL Server administration, best practice and migration commands included.


Get-DbaPageFileSetting

Returns detailed information about the Windows page file.

  • WMI class Win32_ComputerSystem tells us if Page File is managed automatically.
  • If TRUE all other properties do not exist.
  • If FALSE classes Win32_PageFile, Win32_PageFileSetting en Win32_PageFileUsage are examined.
  • CIM is used, first via WinRM, and if not successful, via DCOM.

Screenshots

Examples

To return a custom object displaying ComputerName, AutoPageFile, FileName, Status, LastModified, LastAccessed, AllocatedBaseSize, InitialSize, MaximumSize, PeakUsage, CurrentUsage for ServerA and ServerB

Get-DbaPageFileSetting -ComputerName ServerA, ServerB

To return a custom object displaying ComputerName, AutoPageFile, FileName, Status, LastModified, LastAccessed, AllocatedBaseSize, InitialSize, MaximumSize, PeakUsage, CurrentUsage for all servers in a text file named servers.txt.

Get-Content servers.txt| Get-DbaPageFileSetting

Author

This command was created by Klaas Vandenberghe. You can find Klaas on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaPageFileSetting -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaPageFileSetting.ps1 on GitHub
 

Related commands