external help file | Module Name | online version | schema |
---|---|---|---|
AutomaticMaintenance-help.xml |
AutomaticMaintenance |
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-InfrastructureMaintenance
Performs maintenance tasks on all hosts defined in the main configuration file.
PS C:\> Invoke-InfrastructureMaintenance -DebugLog
Performs 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: False
A 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: False
A 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: False
The 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: False
Defines 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: 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).