API Reference
Command
Install-CxWindowsUpdate
Implements the Install-CxWindowsUpdate cmdlet.
Examples
Example 1
Install-CxWindowsUpdate -Preview
Example 2
Install-CxWindowsUpdate -DownloadOnly -AcceptEula
Example 3
Install-CxWindowsUpdate -UpdateType Driver -MaxUpdates 5 -WhatIf
Example 4
Install-CxWindowsUpdate -AcceptEula -IncludeFollowUpEventTelemetry
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Install-CxWindowsUpdate [-ComputerName <string[]>] [-AcceptEula] [-AutoSelectOnWebSites <bool>] [-BrowseOnly <bool>] [-CategoryId <string[]>] [-ClientApplicationId <string>] [-CustomCriteria <string>] [-DeploymentAction <Unknown>] [-DownloadBeforeInstall <bool>] [-DownloadOnly] [-FollowUpEventLookbackDays <int>] [-FollowUpHistoryDays <int>] [-FollowUpHistoryFailureCriticalThreshold <int>] [-FollowUpHistoryFailureWarningThreshold <int>] [-FollowUpHistoryMaxEntries <int>] [-FollowUpImpactSeverity <Unknown|Informational|Warning|Critical>] [-FollowUpImpactTarget <string>] [-FollowUpImpactTypesAffected <int>] [-FollowUpIncludeDownstreamComputerTargets <bool>] [-FollowUpProviderMode <Endpoint|Wsus|Hybrid>] [-FollowUpQueryTimeoutSeconds <int>] [-FollowUpSecurityAsOfMonthOffset <int>] [-FollowUpSecurityCriticalCountsAsCritical <bool>] [-FollowUpSecurityExploitedCountsAsCritical <bool>] [-FollowUpSecurityLookbackMonths <int>] [-FollowUpSecurityMissingCountWarningThreshold <int>] [-FollowUpSecurityMissingCriticalThreshold <int>] [-FollowUpSecurityMissingExploitedThreshold <int>] [-FollowUpSecurityOsQueryTimeoutSeconds <int>] [-FollowUpSecurityTopListLimit <int>] [-FollowUpTargetPriorityWeight <int>] [-FollowUpTargetRole <string>] [-FollowUpWsusLagCriticalHours <int>] [-FollowUpWsusLagWarningHours <int>] [-FollowUpWsusProviderExecutionComputerName <string>] [-FollowUpWsusProviderExecutionMode <LocalApi|RemotePowerShell>] [-FollowUpWsusProviderPort <int>] [-FollowUpWsusProviderServer <string>] [-FollowUpWsusProviderUseSsl] [-FollowUpWsusQueryTimeoutSeconds <int>] [-FollowUpWsusStatusStaleCriticalHours <int>] [-FollowUpWsusStatusStaleWarningHours <int>] [-FollowUpWsusSummaryFailedCriticalThreshold <int>] [-FollowUpWsusSummaryFailedWarningThreshold <int>] [-FollowUpWsusSummaryNotInstalledCriticalThreshold <int>] [-FollowUpWsusSummaryNotInstalledWarningThreshold <int>] [-FollowUpWsusSummaryPendingRebootCriticalThreshold <int>] [-FollowUpWsusSummaryPendingRebootWarningThreshold <int>] [-FollowUpWsusSummaryPreferApprovedInstallCounters <bool>] [-IncludeFollowUpEventTelemetry] [-IncludeFollowUpSecurityCorrelation] [-InstallationStatus <Installed|NotInstalled>] [-IsAssigned <bool>] [-IsHidden <bool>] [-Kb <string[]>] [-MaxUpdates <int>] [-Online <bool>] [-Preview] [-Query <string>] [-RebootRequired <bool>] [-RevisionNumber <int>] [-ServerSelection <Default|ManagedServer|WindowsUpdate|Others>] [-ServiceId <string>] [-ServiceName <string>] [-SkipFollowUpComplianceSummary] [-SkipFollowUpCorrelation] [-SkipFollowUpTelemetry] [-UpdateId <string[]>] [-UpdateType <Unknown|Software|Driver|ServicePack>] [<CommonParameters>]#Parameters
- ComputerName string[]
- Target computer(s). Only the local computer is supported for orchestration.
- AcceptEula SwitchParameter
- Accepts pending update EULAs automatically before download or install.
- AutoSelectOnWebSites bool
- Optional auto-select-on-web-sites filter.
- BrowseOnly bool
- Optional browse-only filter.
- CategoryId string[]
- Optional category identifiers to include.
- ClientApplicationId string
- Optional WUA client application identifier applied to download and install actions.
- CustomCriteria string
- Optional custom WUA criteria appended to the structured query.
- DeploymentAction WindowsUpdateDeploymentAction
- Optional deployment action filter. Possible values: Unknown, None, Installation, Uninstallation, Detection, OptionalInstallation, All
- Possible values:
Unknown,Installation,Uninstallation,Detection,OptionalInstallation,All - DownloadBeforeInstall bool
- Controls whether missing update content is downloaded before installation.
- DownloadOnly SwitchParameter
- Downloads matching updates without installing them.
- FollowUpEventLookbackDays int
- Event lookback window in days for post-action event telemetry collection.
- FollowUpHistoryDays int
- Number of days included in the post-action recent-history slice. Set to 0 to disable the day cutoff.
- FollowUpHistoryFailureCriticalThreshold int
- Critical threshold for failed recent-history rows in the post-action compliance summary. Set to 0 to disable.
- FollowUpHistoryFailureWarningThreshold int
- Warning threshold for failed recent-history rows in the post-action compliance summary. Set to 0 to disable.
- FollowUpHistoryMaxEntries int
- Maximum number of post-action history rows retained in the compliance summary. Set to 0 to disable the cap.
- FollowUpImpactSeverity WindowsUpdatePatchImpactSeverity
- Optional impact severity used for reusable post-action patch-priority weighting. Possible values: Unknown, Informational, Warning, Critical
- Possible values:
Unknown,Informational,Warning,Critical - FollowUpImpactTarget string
- Optional impact target or owning service label used for reusable post-action patch-priority weighting.
- FollowUpImpactTypesAffected int
- Optional count of affected impact types or dependent services used for reusable post-action patch-priority weighting.
- FollowUpIncludeDownstreamComputerTargets bool
- When true, post-action WSUS provider correlation includes downstream computer targets.
- FollowUpProviderMode WindowsUpdateProviderMode
- Provider mode used for the post-action correlation result. Possible values: Endpoint, Wsus, Hybrid
- Possible values:
Endpoint,Wsus,Hybrid - FollowUpQueryTimeoutSeconds int
- Per-query timeout in seconds for post-action telemetry collection.
- FollowUpSecurityAsOfMonthOffset int
- Month offset used for post-action MSRC correlation. 0 means current month, 1 means previous month, and so on.
- FollowUpSecurityCriticalCountsAsCritical bool
- When true, critical updates force follow-up critical state in MSRC correlation.
- FollowUpSecurityExploitedCountsAsCritical bool
- When true, exploited updates force follow-up critical state in MSRC correlation.
- FollowUpSecurityLookbackMonths int
- Number of months included in follow-up MSRC gap collection, counting backward from the selected as-of month.
- FollowUpSecurityMissingCountWarningThreshold int
- Missing-update count threshold used for follow-up warning state in MSRC correlation.
- FollowUpSecurityMissingCriticalThreshold int
- Missing critical-update threshold used for follow-up critical-state candidate in MSRC correlation.
- FollowUpSecurityMissingExploitedThreshold int
- Missing exploited-update threshold used for follow-up exploited-state candidate in MSRC correlation.
- FollowUpSecurityOsQueryTimeoutSeconds int
- Optional OS detection timeout in seconds for post-action MSRC correlation. Use 0 to keep evaluator defaults.
- FollowUpSecurityTopListLimit int
- Maximum number of KB/CVE items returned in follow-up top lists for MSRC correlation.
- FollowUpTargetPriorityWeight int
- Optional non-negative priority weight applied to the target for post-action patch posture scoring.
- FollowUpTargetRole string
- Optional target role label used for reusable post-action patch-priority weighting.
- FollowUpWsusLagCriticalHours int
- Hybrid lag threshold in hours for follow-up critical state.
- FollowUpWsusLagWarningHours int
- Hybrid lag threshold in hours for follow-up warning state.
- FollowUpWsusProviderExecutionComputerName string
- Optional computer name used for remote WSUS-hosted execution during post-action follow-up. Defaults to the WSUS host when FollowUpWsusProviderExecutionMode is .
- FollowUpWsusProviderExecutionMode WindowsUpdateWsusExecutionMode
- Selects how the post-action WSUS provider query is executed. Possible values: LocalApi, RemotePowerShell
- Possible values:
LocalApi,RemotePowerShell - FollowUpWsusProviderPort int
- WSUS provider port used for post-action hybrid or WSUS correlation.
- FollowUpWsusProviderServer string
- Optional WSUS provider server used for post-action hybrid or WSUS correlation.
- FollowUpWsusProviderUseSsl SwitchParameter
- When true, post-action WSUS provider correlation uses SSL.
- FollowUpWsusQueryTimeoutSeconds int
- Timeout in seconds for the post-action WSUS provider query.
- FollowUpWsusStatusStaleCriticalHours int
- WSUS-only status-report age threshold in hours for follow-up critical state.
- FollowUpWsusStatusStaleWarningHours int
- WSUS-only status-report age threshold in hours for follow-up warning state.
- FollowUpWsusSummaryFailedCriticalThreshold int
- Follow-up WSUS summary-risk critical threshold for failed updates. Set to 0 to disable.
- FollowUpWsusSummaryFailedWarningThreshold int
- Follow-up WSUS summary-risk warning threshold for failed updates. Set to 0 to disable.
- FollowUpWsusSummaryNotInstalledCriticalThreshold int
- Follow-up WSUS summary-risk critical threshold for not-installed updates. Set to 0 to disable.
- FollowUpWsusSummaryNotInstalledWarningThreshold int
- Follow-up WSUS summary-risk warning threshold for not-installed updates. Set to 0 to disable.
- FollowUpWsusSummaryPendingRebootCriticalThreshold int
- Follow-up WSUS summary-risk critical threshold for installed-pending-reboot updates. Set to 0 to disable.
- FollowUpWsusSummaryPendingRebootWarningThreshold int
- Follow-up WSUS summary-risk warning threshold for installed-pending-reboot updates. Set to 0 to disable.
- FollowUpWsusSummaryPreferApprovedInstallCounters bool
- When true, follow-up WSUS summary risk prefers per-update approved-install counters.
- IncludeFollowUpEventTelemetry SwitchParameter
- Includes event-log signals in the post-action Windows Update telemetry snapshot.
- IncludeFollowUpSecurityCorrelation SwitchParameter
- Includes post-action MSRC-based security correlation.
- InstallationStatus WindowsUpdateInstallationStatus
- Optional installation state filter. Possible values: Installed, NotInstalled
- Possible values:
Installed,NotInstalled - IsAssigned bool
- Optional assigned-state filter.
- IsHidden bool
- Optional hidden-state filter.
- Kb string[]
- Optional KB article identifiers to include.
- MaxUpdates int
- Optional maximum number of returned updates per computer. Set to 0 to disable the cap.
- Online bool
- Optional flag controlling whether the searcher performs an online scan.
- Preview SwitchParameter
- Returns the planned action without downloading or installing updates.
- Query string
- Optional raw WUA criteria string. When supplied, structured filters are ignored.
- RebootRequired bool
- Optional reboot-required filter.
- RevisionNumber int
- Optional revision number filter.
- ServerSelection WindowsUpdateServerSelection
- Optional WUA searcher server selection. Possible values: Default, ManagedServer, WindowsUpdate, Others
- Possible values:
Default,ManagedServer,WindowsUpdate,Others - ServiceId string
- Optional update service identifier used when ServerSelection is Others.
- ServiceName string
- Optional update service display name resolved through the reusable service-discovery layer.
- SkipFollowUpComplianceSummary SwitchParameter
- Skips the post-action compliance summary.
- SkipFollowUpCorrelation SwitchParameter
- Skips the post-action correlation result.
- SkipFollowUpTelemetry SwitchParameter
- Skips the post-action Windows Update telemetry snapshot.
- UpdateId string[]
- Optional update identifiers to include.
- UpdateType WindowsUpdateQueryType
- Optional update type filter. Possible values: Unknown, Software, Driver, ServicePack
- Possible values:
Unknown,Software,Driver,ServicePack
Outputs
ComputerX.Updates.WindowsUpdateOperationResult