< Back
Import-iBMCNTPGroupKey
Post
NAME Import-iBMCNTPGroupKey
SYNOPSIS
Import the iBMC NTP group key
SYNTAX
Import-iBMCNTPGroupKey [-Session] <RedfishSession[]> [-KeyFileUri] <String[]> [<CommonParameters>]
DESCRIPTION
Import the iBMC NTP group key
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
-KeyFileUri <String[]>
Indicates the path of NTP group key certificate file
It supports HTTPS, SFTP, NFS, SCP, and CIFS and FILE file transfer protocols.
For examples:
- local path: C:\\ntp.keys or \\\\192.168.1.2\\ntp.keys
- ibmc local temporary path: /tmp/ntp.keys
- remote path: protocol://username:password@hostname/directory/ntp.keys
Required? true
Position? 2
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
PSObject[]
Returns the import group key task details 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:\\> Import-iBMCNTPGroupKey -Session $session -KeyFileUri "E:\\ntp.keys"
Host : 10.1.1.2
Id : 1
Name : ntp certificate import
ActivityName : [10.1.1.2] ntp certificate import
TaskState : Completed
StartTime : 2018-12-21T05:51:46+00:00
EndTime : 2018-12-21T05:51:49+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to import NTP group key from local file
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Import-iBMCNTPGroupKey -Session $session -KeyFileUri "/tmp/ntp.keys"
Host : 10.1.1.2
Id : 1
Name : ntp certificate import
ActivityName : [10.1.1.2] ntp certificate import
TaskState : Completed
StartTime : 2018-12-21T05:51:46+00:00
EndTime : 2018-12-21T05:51:49+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to import NTP group key from ibmc temp file
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Import-iBMCNTPGroupKey -Session $session -KeyFileUri "nfs://10.10.10.2/data/nfs/ntp.keys"
Host : 10.1.1.2
Id : 1
Name : ntp certificate import
ActivityName : [10.1.1.2] ntp certificate import
TaskState : Completed
StartTime : 2018-12-21T05:51:46+00:00
EndTime : 2018-12-21T05:51:49+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to import NTP group key from NFS network file
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCNTPSetting
Set-iBMCNTPSetting
Connect-iBMC
Disconnect-iBMC
SYNOPSIS
Import the iBMC NTP group key
SYNTAX
Import-iBMCNTPGroupKey [-Session] <RedfishSession[]> [-KeyFileUri] <String[]> [<CommonParameters>]
DESCRIPTION
Import the iBMC NTP group key
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
-KeyFileUri <String[]>
Indicates the path of NTP group key certificate file
It supports HTTPS, SFTP, NFS, SCP, and CIFS and FILE file transfer protocols.
For examples:
- local path: C:\\ntp.keys or \\\\192.168.1.2\\ntp.keys
- ibmc local temporary path: /tmp/ntp.keys
- remote path: protocol://username:password@hostname/directory/ntp.keys
Required? true
Position? 2
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
PSObject[]
Returns the import group key task details 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:\\> Import-iBMCNTPGroupKey -Session $session -KeyFileUri "E:\\ntp.keys"
Host : 10.1.1.2
Id : 1
Name : ntp certificate import
ActivityName : [10.1.1.2] ntp certificate import
TaskState : Completed
StartTime : 2018-12-21T05:51:46+00:00
EndTime : 2018-12-21T05:51:49+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to import NTP group key from local file
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Import-iBMCNTPGroupKey -Session $session -KeyFileUri "/tmp/ntp.keys"
Host : 10.1.1.2
Id : 1
Name : ntp certificate import
ActivityName : [10.1.1.2] ntp certificate import
TaskState : Completed
StartTime : 2018-12-21T05:51:46+00:00
EndTime : 2018-12-21T05:51:49+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to import NTP group key from ibmc temp file
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Import-iBMCNTPGroupKey -Session $session -KeyFileUri "nfs://10.10.10.2/data/nfs/ntp.keys"
Host : 10.1.1.2
Id : 1
Name : ntp certificate import
ActivityName : [10.1.1.2] ntp certificate import
TaskState : Completed
StartTime : 2018-12-21T05:51:46+00:00
EndTime : 2018-12-21T05:51:49+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to import NTP group key from NFS network file
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCNTPSetting
Set-iBMCNTPSetting
Connect-iBMC
Disconnect-iBMC