< Back
Get-ComputerMaintenanceConfiguration
Post
NAME Get-ComputerMaintenanceConfiguration
SYNOPSIS
Returns full maintenance configuration for a given host or a group of hosts.
SYNTAX
Get-ComputerMaintenanceConfiguration -ComputerName <String> [-FilePath <String>] [-NoRecurse] [<CommonParameters>]
Get-ComputerMaintenanceConfiguration [-FilePath <String>] [-FilterScript <ScriptBlock>] [-NoRecurse]
[<CommonParameters>]
DESCRIPTION
The function supports two modes: you can either pass a computer name (`-ComputerName` parameter) or a scriptblock
(`-FilterScript` parameter) to select for which computers to build a maintenance configuration. The function is
used by other functions in the module and exposed mainly for troubleshooting purposes.
PARAMETERS
-ComputerName <String>
Specifies the name of a host to lookup.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FilePath <String>
A path to the main configuration file.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FilterScript <ScriptBlock>
Specifies a scriptblock to use to filter hosts from the main configuration file.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NoRecurse [<SwitchParameter>]
Turns off templates resolving - only data from the main configuration file will be returned.
Required? false
Position? named
Default value False
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
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration -ComputerName SRV01
Returns a full configuration for a host, which name is SRV01.
-------------------------- Example 2 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration -ComputerName SRV01 -NoRecurse
Returns a full configuration for a host, which name is SRV01. Does not resolve templates if the host has any.
-------------------------- Example 3 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration -FilterScript {$_.Template -eq 'Example-Template'}
Returns a full configuration for hosts, which have "Example-Template" as their template.
-------------------------- Example 4 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration
Returns a full configuration for all hosts.
RELATED LINKS
SYNOPSIS
Returns full maintenance configuration for a given host or a group of hosts.
SYNTAX
Get-ComputerMaintenanceConfiguration -ComputerName <String> [-FilePath <String>] [-NoRecurse] [<CommonParameters>]
Get-ComputerMaintenanceConfiguration [-FilePath <String>] [-FilterScript <ScriptBlock>] [-NoRecurse]
[<CommonParameters>]
DESCRIPTION
The function supports two modes: you can either pass a computer name (`-ComputerName` parameter) or a scriptblock
(`-FilterScript` parameter) to select for which computers to build a maintenance configuration. The function is
used by other functions in the module and exposed mainly for troubleshooting purposes.
PARAMETERS
-ComputerName <String>
Specifies the name of a host to lookup.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FilePath <String>
A path to the main configuration file.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FilterScript <ScriptBlock>
Specifies a scriptblock to use to filter hosts from the main configuration file.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NoRecurse [<SwitchParameter>]
Turns off templates resolving - only data from the main configuration file will be returned.
Required? false
Position? named
Default value False
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
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration -ComputerName SRV01
Returns a full configuration for a host, which name is SRV01.
-------------------------- Example 2 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration -ComputerName SRV01 -NoRecurse
Returns a full configuration for a host, which name is SRV01. Does not resolve templates if the host has any.
-------------------------- Example 3 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration -FilterScript {$_.Template -eq 'Example-Template'}
Returns a full configuration for hosts, which have "Example-Template" as their template.
-------------------------- Example 4 --------------------------
PS C:\\> Get-ComputerMaintenanceConfiguration
Returns a full configuration for all hosts.
RELATED LINKS