| external help file | AutomaticMaintenance-help.xml |
|---|---|
| Module Name | AutomaticMaintenance |
| online version | |
| schema | 2.0.0 |
Use this function to invoke maintenance on all hosts defined in the hosts configuration file.
Invoke-InfrastructureMaintenance [-LogErrorFilePath <String>] [-LogFilePathTemplate <String>] [-LogMutexName <String>] [-DebugLog] [-FailOnPreviousFailure] [<CommonParameters>]
The function performs maintenance on all hosts defined in the hosts configuration files, one by one. Its main purpose is to be executed from Task Scheduler. We do not recommend to execute this function from an orchestration/configuration management system (Ansible, Chef, System Center Orchestrator etc.) - use Invoke-ComputerMaintenance for that.
PS C:\> Invoke-InfrastructureMaintenancePerforms maintenance tasks on all hosts defined in the main configuration file.
PS C:\> Invoke-InfrastructureMaintenance -DebugLogPerforms maintenance tasks on all hosts defined in the main configuration file, while logging every command/variable into debug log files.
Specifies if the function should log maintenance process in details through the debug log.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA path to the error log file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA template used for debug log file paths.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of a mutex used to access a debug log file object.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDefines if the maintenance process should not start when an error log exists.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis 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).