commands

^

Get-DbaPageFileSetting

Author Klaas Vandenberghe (@PowerDBAKlaas)
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Get-DbaPageFileSetting on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaPageFileSetting.

Synopsis

Returns information on the page file configuration of the target computer.

Description

This command uses CIM (or other, related computer management tools) to detect the page file configuration of the target computer(s).

Note that this may require local administrator privileges for the relevant computers.

Syntax

Get-DbaPageFileSetting
    [[-ComputerName] <DbaInstanceParameter[]>]
    [[-Credential] <PSCredential>]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaPageFileSetting -ComputerName ServerA,ServerB

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

Example: 2
PS C:\> 'ServerA' | Get-DbaPageFileSetting

Returns a custom object displaying ComputerName, AutoPageFile, FileName, Status, LastModified, LastAccessed, AllocatedBaseSize, InitialSize, MaximumSize, PeakUsage, CurrentUsage for ServerA

Optional Parameters

-ComputerName

The target SQL Server instance or instances.
This can be the name of a computer, a SMO object, an IP address, an AD Computer object, a connection string or a SQL Instance.

Alias
Required False
Pipeline true (ByValue, ByPropertyName)
Default Value $env:COMPUTERNAME
-Credential

Credential object used to connect to the Computer as a different user

Alias
Required False
Pipeline false
Default Value
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False