< Back
Set-iBMCSNMPTrapSetting
Post
NAME Set-iBMCSNMPTrapSetting
SYNOPSIS
Modify iBMC SNMP Trap Notification Settings.
SYNTAX
Set-iBMCSNMPTrapSetting [-Session] <RedfishSession[]> [-ServiceEnabled <Boolean[]>] [-TrapVersion {V1 | V2C | V3}]
[-TrapV3User <String[]>] [-TrapMode {OID | EventCode | PreciseAlarm}] [-TrapServerIdentity {HostName | BoardSN |
ProductAssetTag}] [-CommunityName <Object[]>] [-AlarmSeverity {Critical | Major | Minor | Normal}]
[<CommonParameters>]
DESCRIPTION
Modify iBMC SNMP Trap Notification 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 trap 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
-TrapVersion
Indicates the SNMP trap version
Available Value Set: V1, V2C, V3
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-TrapV3User <String[]>
Indicates the SNMPV3 user name. User name should be an exists iBMC user account's login name.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-TrapMode
Indicates the SNMP trap mode.
Available Value Set: OID, EventCode, PreciseAlarm.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-TrapServerIdentity
Indicates the trap server host identifier.
Available Value Set: BoardSN, ProductAssetTag, HostName.
This parameter is valid only when TrapMode is OID or PreciseAlarm.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-CommunityName <Object[]>
Indicates the Community name. Community name is invalid if SNMPv3 trap is used.
A character string that meets the following requirements:
- Cannot contain spaces.
- Contain 8 to 18 bytes and contain at least two types of uppercase letters, lowercase letters, digits, and
special characters if password complexity check is enabled.
- Contain 1 to 18 password complexity check is disabled.
- Have at least two new characters when compared with the previous community name.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-AlarmSeverity
Indicates which severity level alarm should be notified
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:\\> $CommunityName = ConvertTo-SecureString -String "SomeP@ssw0rd" -AsPlainText -Force
PS C:\\> Set-iBMCSNMPTrapSetting -Session $session -ServiceEnabled $true -TrapVersion V2C `
-TrapV3User chajian -TrapMode EventCode -TrapServerIdentity BoardSN `
-CommunityName $CommunityName -AlarmSeverity Critical
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCSNMPSetting
Set-iBMCSNMPSetting
Get-iBMCSNMPTrapSetting
Get-iBMCSNMPTrapServer
Set-iBMCSNMPTrapServer
Connect-iBMC
Disconnect-iBMC
SYNOPSIS
Modify iBMC SNMP Trap Notification Settings.
SYNTAX
Set-iBMCSNMPTrapSetting [-Session] <RedfishSession[]> [-ServiceEnabled <Boolean[]>] [-TrapVersion {V1 | V2C | V3}]
[-TrapV3User <String[]>] [-TrapMode {OID | EventCode | PreciseAlarm}] [-TrapServerIdentity {HostName | BoardSN |
ProductAssetTag}] [-CommunityName <Object[]>] [-AlarmSeverity {Critical | Major | Minor | Normal}]
[<CommonParameters>]
DESCRIPTION
Modify iBMC SNMP Trap Notification 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 trap 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
-TrapVersion
Indicates the SNMP trap version
Available Value Set: V1, V2C, V3
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-TrapV3User <String[]>
Indicates the SNMPV3 user name. User name should be an exists iBMC user account's login name.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-TrapMode
Indicates the SNMP trap mode.
Available Value Set: OID, EventCode, PreciseAlarm.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-TrapServerIdentity
Indicates the trap server host identifier.
Available Value Set: BoardSN, ProductAssetTag, HostName.
This parameter is valid only when TrapMode is OID or PreciseAlarm.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-CommunityName <Object[]>
Indicates the Community name. Community name is invalid if SNMPv3 trap is used.
A character string that meets the following requirements:
- Cannot contain spaces.
- Contain 8 to 18 bytes and contain at least two types of uppercase letters, lowercase letters, digits, and
special characters if password complexity check is enabled.
- Contain 1 to 18 password complexity check is disabled.
- Have at least two new characters when compared with the previous community name.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-AlarmSeverity
Indicates which severity level alarm should be notified
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:\\> $CommunityName = ConvertTo-SecureString -String "SomeP@ssw0rd" -AsPlainText -Force
PS C:\\> Set-iBMCSNMPTrapSetting -Session $session -ServiceEnabled $true -TrapVersion V2C `
-TrapV3User chajian -TrapMode EventCode -TrapServerIdentity BoardSN `
-CommunityName $CommunityName -AlarmSeverity Critical
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCSNMPSetting
Set-iBMCSNMPSetting
Get-iBMCSNMPTrapSetting
Get-iBMCSNMPTrapServer
Set-iBMCSNMPTrapServer
Connect-iBMC
Disconnect-iBMC