< Back

Set-iBMCSMTPSetting

Tue Jan 14, 2020 3:11 am

NAME Set-iBMCSMTPSetting



SYNOPSIS

Modify iBMC SMTP Basic Settings.





SYNTAX

Set-iBMCSMTPSetting [-Session] <RedfishSession[]> [-ServiceEnabled <Boolean[]>] [-ServerAddress <String[]>]

[-TLSEnabled <Boolean[]>] [-AnonymousLoginEnabled <Boolean[]>] [-SenderUserName <String[]>] [-SenderAddress

<String[]>] [-SenderPassword <Object[]>] [-EmailSubject <String[]>] [-EmailSubjectContains <ServerIdentity[][]>]

[-AlarmSeverity {Critical | Major | Minor | Normal}] [<CommonParameters>]





DESCRIPTION

Modify iBMC SMTP Basic Settings.





PARAMETERS

-Session <RedfishSession[]>

iBMC redfish session object which is created by Connect-iBMC cmdlet.

A session object identifies an iBMC server to which this cmdlet will be executed.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-ServiceEnabled <Boolean[]>

Indicates whether SMTP is enabled.

Support values are powershell boolean value: $true(1), $false(0).



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-ServerAddress <String[]>

Indicates the SMTP server address.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-TLSEnabled <Boolean[]>

Indicates whether TLS is enabled in the SMTP server.

Support values are powershell boolean value: $true(1), $false(0).



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-AnonymousLoginEnabled <Boolean[]>

Indicates whether anonymous login is enabled.

Support values are powershell boolean value: $true(1), $false(0).



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-SenderUserName <String[]>

Indicates the User name of the email sender.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-SenderAddress <String[]>

Indicates the mailbox address of the email sender.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-SenderPassword <Object[]>

Indicates the User password of the email sender.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-EmailSubject <String[]>

Indicates the subject of the email to be sent.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-EmailSubjectContains <ServerIdentity[][]>

Indicates the server identity injected in the email subject.

The subject can contain one or more of the following:

- HostName: Host name

- BoardSN: Board serial number

- ProductAssetTag: Product asset tab



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-AlarmSeverity

Indicates the severity levels of the alarm to be sent

Available Value Set: Critical, Major, Minor, Normal

- Critical (critical)

- Major (major and higher)

- Minor (minor and higher)

- Normal (normal and higher)



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Null

Returns Null if cmdlet executes successfully.

In case of an error or warning, exception will be returned.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$credential = Get-Credential



PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert

PS C:\\> $pwd = ConvertTo-SecureString -String "pwd12#$%^" -AsPlainText -Force

PS C:\\> $ServerIdentifer = ,@('HostName', 'BoardSN')

PS C:\\> Set-iBMCSMTPSetting $session -ServiceEnabled $false -ServerAddress smtp.huawei.com `

-TLSEnabled $false -AnonymousLoginEnabled $false `

-SenderUserName 'Huawei-iBMC' -SenderAddress "powershell@huawei.com" -SenderPassword $pwd `

-EmailSubject 'iBMC Alarm Notification' -EmailSubjectContains $ServerIdentifer `

-AlarmSeverity Critical











RELATED LINKS

https://github.com/Huawei/Huawei-iBMC-Cmdlets



Get-iBMCSMTPSetting

Get-iBMCSMTPRecipients

Set-iBMCSMTPRecipient

Connect-iBMC

Disconnect-iBMC