cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
687
Views
0
Helpful
1
Replies

Connect to UCS using function in powershell

einarbjey
Level 1
Level 1

Hi,

Has anyone successfully connected to ucs using function when i try to ucs my connection function í connect to ucs successfully but I get error massage saying "get-ucsblade : No UcsHandle specified and the Default Ucs list is empty."

then if i run $DefaultUcs my list is empty

 

this is my function I am trying to use

function connect-to-ucs {

 

$cred = Get-Credential -UserName admin -Message "admin"

Connect-UCS -Name x.x.x.x -Credential $cred

 

}

 

 

if I just connect with connect-ucs -name x.x.x.x 

and run $DefaultUcs it show my connection to ucs

1 Reply 1

AFROJ AHMAD
Cisco Employee
Cisco Employee

This doesn't seems to be power tool issue , some issue with "variables" I guess.

 

please reach out to The Devnet Community for help:

 

  https://communities.cisco.com/community/technology/datacenter/compute-and-storage/ucs_management/cisco_ucs_developed_integrations

 

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

Review Cisco Networking products for a $25 gift card