exports/Set-SysManSettingStatus.ps1

<#
.Synopsis
 
.Description
 
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/sysman.webapi/set-sysmansettingstatus
.Inputs
SysMan.Powershell.Models.IUpsertComponentStatusCommand
.Outputs
SysMan.Powershell.Models.IApiErrorMessage
.Outputs
SysMan.Powershell.Models.IComponentHealth
.Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
 
CMD <IUpsertComponentStatusCommand>: Upsert (Update, or if not exists, creates a new component status entry)
  Component <String>: The name of the component that is reporting its status
  Status <String>: The current status. Possible values: { Unknown, Success, Warning, Error }.
  Version <String>: The version of the component
  [Message <String>]: The message that describes the current status (if error =&gt; error message etc.)
.Link
https://docs.microsoft.com/en-us/powershell/module/sysman.webapi/set-sysmansettingstatus
#>

function Set-SysManSettingStatus {
[OutputType([SysMan.Powershell.Models.IComponentHealth], [SysMan.Powershell.Models.IApiErrorMessage])]
[CmdletBinding(DefaultParameterSetName='PutExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
    [Parameter(ParameterSetName='Put', Mandatory, ValueFromPipeline)]
    [SysMan.Powershell.Category('Body')]
    [SysMan.Powershell.Models.IUpsertComponentStatusCommand]
    # Upsert (Update, or if not exists, creates a new component status entry)
    # To construct, see NOTES section for CMD properties and create a hash table.
    ${Cmd},

    [Parameter(ParameterSetName='PutExpanded', Mandatory)]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    # The name of the component that is reporting its status
    ${Component},

    [Parameter(ParameterSetName='PutExpanded', Mandatory)]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    # The current status.
    # Possible values: { Unknown, Success, Warning, Error }.
    ${Status},

    [Parameter(ParameterSetName='PutExpanded', Mandatory)]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    # The version of the component
    ${Version},

    [Parameter(ParameterSetName='PutExpanded')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    # The message that describes the current status (if error =&gt; error message etc.)
    ${Message},

    [Parameter(DontShow)]
    [SysMan.Powershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [SysMan.Powershell.Category('Runtime')]
    [SysMan.Powershell.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [SysMan.Powershell.Category('Runtime')]
    [SysMan.Powershell.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [SysMan.Powershell.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [SysMan.Powershell.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [SysMan.Powershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Use the default credentials for the proxy
    ${ProxyUseDefaultCredentials}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PSCmdlet.ParameterSetName
        $mapping = @{
            Put = 'SysMan.WebApi.private\Set-SysManSettingStatus_Put';
            PutExpanded = 'SysMan.WebApi.private\Set-SysManSettingStatus_PutExpanded';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# SIG # Begin signature block
# MIIL+gYJKoZIhvcNAQcCoIIL6zCCC+cCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC/cyPX7EP4XJge
# avIGR4+6vcgNYF1oXaHydSRdL0ULW6CCCT4wggSZMIIDgaADAgECAhBxoLc2ld2x
# r8I7K5oY7lTLMA0GCSqGSIb3DQEBCwUAMIGpMQswCQYDVQQGEwJVUzEVMBMGA1UE
# ChMMdGhhd3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2Vz
# IERpdmlzaW9uMTgwNgYDVQQLEy8oYykgMjAwNiB0aGF3dGUsIEluYy4gLSBGb3Ig
# YXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UEAxMWdGhhd3RlIFByaW1hcnkgUm9v
# dCBDQTAeFw0xMzEyMTAwMDAwMDBaFw0yMzEyMDkyMzU5NTlaMEwxCzAJBgNVBAYT
# AlVTMRUwEwYDVQQKEwx0aGF3dGUsIEluYy4xJjAkBgNVBAMTHXRoYXd0ZSBTSEEy
# NTYgQ29kZSBTaWduaW5nIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
# AQEAm1UCTBcF6dBmw/wordPA/u/g6X7UHvaqG5FG/fUW7ZgHU/q6hxt9nh8BJ6u5
# 0mfKtxAlU/TjvpuQuO0jXELvZCVY5YgiGr71x671voqxERGTGiKpdGnBdLZoh6eD
# MPlk8bHjOD701sH8Ev5zVxc1V4rdUI0D+GbNynaDE8jXDnEd5GPJuhf40bnkiNIs
# KMghIA1BtwviL8KA5oh7U2zDRGOBf2hHjCsqz1v0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