Contents

Introduction

Prerequisites

Requirements

Components Used

Background Information

Configure

Reset Device Connector on a Standalone Server

Step 1. Install CIMC Library

Step 2. Set IP and Credentials

Step 3. Check Cloud DNS and Prepare the Identity

Step 4. Reset Device Connector

Step 5. Disconnect from CIMC

Reset Device Connector on UCS Manager

Step 1. Install UCSM library

Step 2. Set IP and Credentials

Step 3. Check Cloud DNS and Prepare the Identity

Step 4. Reset Device Connector

Step 5. Disconnect from UCSM

Related Information

Introduction

This document describes how to reset Device Connector to Factory Default for UCS Manager or Cisco Integrated Management Controller.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

- Basic understanding of Unified Computing Systems Servers (UCS)

- Basic understanding of UCS Manager (UCSM)

- Basic understanding of Cisco Integrated Management Controller (CIMC)

- Basic understanding of Intersight

- Basic understanding of Powershell

Components Used

This document is not restricted to specific software versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Background Information

Ensure that you have these requirements before you attempt this configuration.

- Intersight admin account

- Connectivity to Intersight and UCSM or CIMC

- Computer with powershell

Configure

Note: Powershell needs to be already installed before you proceed with this proccedure.

Reset Device Connector on a Standalone Server

Step 1. Install CIMC Library

Launch Powershell in your computer and run the command:

PS /Users/admin>  Install-Module -Name Cisco.IMC

Step 2. Set IP and Credentials

Note: You need to set your admin account and password. You can also use a user that has admin privileges.

PS /Users/admin> $ip = “x.x.x.x"

PS /Users/admin> $credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "admin",$(ConvertTo-SecureString -Force -AsPlainText "PASSWORD")

PS /Users/admin> $cookie = Connect-Imc $ip -Credential $credentials | Select Cookie

PS /Users/admin> $headers = @{

>>  'ucsmcookie'="ucsm-cookie="+$cookie.cookie

>>  }

Step 3. Check Cloud DNS and Prepare the Identity

PS /Users/admin> Invoke-WebRequest https://$ip/connector/DeviceConnections -Headers $headers -SkipCertificateCheck | Select content -Expand Content | ConvertFrom-Json | Select CloudDns

You get an output like this:

CloudDns

--------

svc.intersight.com

Use Cloud DNS output for body variable.

PS /Users/admin> $body = @{

>>     "CloudDns" ="svc.intersight.com"

>>     "ForceResetIdentity" = $true

>>     "ResetIdentity" = $true

>> }

Step 4. Reset Device Connector

PS /Users/admin> Invoke-WebRequest -Method 'Put' -Uri https://$ip/connector/DeviceConnections  -Body ($body|ConvertTo-Json) -Headers $headers -ContentType "application/json" -SkipCertificateCheck

You get an output like this:

StatusCode        : 200

StatusDescription : OK

Content           : [

{}

]

RawContent        : HTTP/1.1 200 OK

Server: webserver

Date: Wed, 27 Sep 2023 00:54:16 GMT

Transfer-Encoding: chunked

Connection: keep-alive

X-Frame-Options: SAMEORIGIN

Cache-Control: no-store, no-cache, max-age=0

Prevent…

Headers           : {[Server, System.String[]], [Date, System.String[]], [Transfer-Encoding, System.String[]], [Connection, System.String[]]…}

Images            : {}

InputFields       : {}

Links             : {}

RawContentLength  : 8

RelationLink      : {}

Step 5. Disconnect from CIMC

Disconnect-Imc

Reset Device Connector on UCS Manager

Step 1. Install UCSM library

Launch Powershell in your computer and run the command:

PS /Users/admin>  Install-Module -Name Cisco.UCSManager

Step 2. Set IP and Credentials

Note: You need to set your admin account and password. You can also use a user that has admin privileges.

PS /Users/admin> $ip = “x.x.x.x"

PS /Users/admin> $credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "admin",$(ConvertTo-SecureString -Force -AsPlainText "PASSWORD")

PS /Users/admin> $cookie = Connect-Ucs $ip -Credential $credentials | Select Cookie

PS /Users/admin> $headers = @{

>>  'ucsmcookie'="ucsm-cookie="+$cookie.cookie

>>  }

Step 3. Check Cloud DNS and Prepare the Identity

PS /Users/admin> Invoke-WebRequest https://$ip/connector/DeviceConnections -Headers $headers -SkipCertificateCheck | Select content -Expand Content | ConvertFrom-Json | Select CloudDns

You get an output like this:

CloudDns

--------

svc.ucs-connect.com

Use Cloud DNS output for body variable.

PS /Users/admin> $body = @{

>>     "CloudDns" =“svc.ucs-connect.com"

>>     "ForceResetIdentity" = $true

>>     "ResetIdentity" = $true

>> }

Step 4. Reset Device Connector

PS /Users/admin> Invoke-WebRequest -Method 'Put' -Uri https://$ip/connector/DeviceConnections  -Body ($body|ConvertTo-Json) -Headers $headers -ContentType "application/json" -SkipCertificateCheck

You get an output like this:

StatusCode        : 200

StatusDescription : OK

Content           : [

{

"CloudDns": "svc.ucs-connect.com",

"CloudDnsList": [

"svc-static1.intersight.com",

"svc.ucs-connect.com",

"svc-static1.ucs-connect.com",

"svc.intersight.com"

…

RawContent        : HTTP/1.1 200 OK

Date: Wed, 27 Sep 2023 00:33:09 GMT

Server: Apache

Strict-Transport-Security: max-age=31536000; includeSubDomains

Cache-Control: no-store, must-revalidate, no-cache

Pragma: no-cache

X-…

Headers           : {[Date, System.String[]], [Server, System.String[]], [Strict-Transport-Security, System.String[]], [Cache-Control, System.String[]]…}

Images            : {}

InputFields       : {}

Links             : {}

RawContentLength  : 20468

RelationLink      : {}

Step 5. Disconnect from UCSM

Disconnect-Ucs

Related Information

- Device Connector

- Powershell with UCS

- Technical Support & Documentation - Cisco Systems