< Back
Get-DbaPageFileSetting
Post
NAME Get-DbaPageFileSetting
SYNOPSIS
Returns information on the page file configuration of the target computer.
SYNTAX
Get-DbaPageFileSetting [[-ComputerName] <Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
[[-Credential] <Pscredential>] [-EnableException <Switch>] [<CommonParameters>]
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.
PARAMETERS
-ComputerName [<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Credential [<Pscredential>]
Credential object used to connect to the Computer as a different user
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-EnableException [<Switch>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Server, Management, PageFile
Author: Klaas Vandenberghe (@PowerDBAKlaas)
dbatools PowerShell module (https://dbatools.io)
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- 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
RELATED LINKS
https://dbatools.io/Get-DbaPageFileSetting
SYNOPSIS
Returns information on the page file configuration of the target computer.
SYNTAX
Get-DbaPageFileSetting [[-ComputerName] <Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
[[-Credential] <Pscredential>] [-EnableException <Switch>] [<CommonParameters>]
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.
PARAMETERS
-ComputerName [<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Credential [<Pscredential>]
Credential object used to connect to the Computer as a different user
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-EnableException [<Switch>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Server, Management, PageFile
Author: Klaas Vandenberghe (@PowerDBAKlaas)
dbatools PowerShell module (https://dbatools.io)
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- 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
RELATED LINKS
https://dbatools.io/Get-DbaPageFileSetting