external help file | Module Name | online version | schema |
---|---|---|---|
AutomaticMaintenance-help.xml |
AutomaticMaintenance |
2.0.0 |
Returns full maintenance configuration for a given host or a group of hosts.
Get-ComputerMaintenanceConfiguration -ComputerName <String> [-FilePath <String>] [-NoRecurse]
[<CommonParameters>]
Get-ComputerMaintenanceConfiguration [-FilePath <String>] [-FilterScript <ScriptBlock>] [-NoRecurse]
[<CommonParameters>]
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.
PS C:\> Get-ComputerMaintenanceConfiguration -ComputerName SRV01
Returns a full configuration for a host, which name is SRV01.
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.
PS C:\> Get-ComputerMaintenanceConfiguration -FilterScript {$_.Template -eq 'Example-Template'}
Returns a full configuration for hosts, which have "Example-Template" as their template.
PS C:\> Get-ComputerMaintenanceConfiguration
Returns a full configuration for all hosts.
Specifies the name of a host to lookup.
Type: String
Parameter Sets: ByComputerName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A path to the main configuration file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a scriptblock to use to filter hosts from the main configuration file.
Type: ScriptBlock
Parameter Sets: ByFilter
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Turns off templates resolving - only data from the main configuration file will be returned.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).