<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>RE: What's the command to assign a Service Profile to a Blade?</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_category?p_l_id=2049005&amp;mbCategoryId=0" />
  <subtitle>RE: What's the command to assign a Service Profile to a Blade?</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_category?p_l_id=2049005&amp;mbCategoryId=0</id>
  <updated>2013-05-26T03:10:42Z</updated>
  <dc:date>2013-05-26T03:10:42Z</dc:date>
  <entry>
    <title>0.9.8 Install directory</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=5550632" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=5550632</id>
    <updated>2012-05-02T20:06:03Z</updated>
    <published>2012-05-02T20:05:33Z</published>
    <summary type="html">The release notes for 0.9.8 says :
 
[color=#525252]We have made the installation paths compliant to best practices. So, if you are importing the module using a path, please make the necessary changes to reflect the new path.[/color]
[color=#525252]AND[/color]
[color=#525252]Installer: Path changes and $env:PSModulePath update.[/color]
 
 
I just installed it and I don't see any new or modified folders in the traditional folders for a PS module which I believe would be C:\windows\system32\WindowsPowerShell\v1.0\Modules\ or C:\users\%USER%\documents\windowspowershell\modules. I see the new stuff located at C:\Program Files\Cisco\Cisco UCS PowerTool\Modules\CiscoUcsPS. So did I misunderstand the changing of the path during the installation or did something not go through properly?</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2012-05-02T20:05:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: Connect-UCSM with LDAP</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4549384" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4549384</id>
    <updated>2011-09-28T21:20:14Z</updated>
    <published>2011-09-28T21:14:35Z</published>
    <summary type="html">So I found a work around. Originally I tried to connect using the below code where domain.local would be the name of my Authentication Domain inside the UCS :
[code]
# UCS account
$ucspass = cat "C:\temp\login.txt" | convertto-securestring     
$ucscred = new-object -typename System.Management.Automation.PSCredential -argumentlist "ucs.domain.local\kmurphy",$ucspass

Connect-UCSM -Name "ucs.domain.local" -Credential $ucscred

[/code]

This would always fail with an error:

[color=#ff0505]Connect-UCSM : Authentication failed
At line:6 char:13
+ Connect-UCSM &lt;&lt;&lt;&lt;  -Name "UCS.domain.local" -Credential $ucscred
    + CategoryInfo          : ResourceUnavailable: (UCS connection Error:String) 
    [Connect-UCSM], Exception
    + FullyQualifiedErrorId : LoginError,Cisco.UCSCmdlet.Commands.Connection.Con 
   nectUCSM[/color]

For the past few days I have been mulling over the idea of using my old connection object with aaaLogin and passing the information into an object of the same type of CurrentUCSMInstance but didn't feel like it was a proper enough solution. Today I got struck and realized I should look deeper at the CurrentUCSMInstance and created a new object of Cisco.Common.DataTypes.UCSLoginInfo. I am happy to say that this code successfully returned an authenticated connection and queries for Get-Chassis.
 [code]
 # UCS account
 $ucspass = cat "C:\temp\login.txt" | convertto-securestring     
 $ucscred = new-object -typename System.Management.Automation.PSCredential -argumentlist "ucs-domain.local\kmurphy",$ucspass
 
 $CurrentUCSMInstance = New-Object Cisco.Common.DataTypes.UCSLoginInfo
 $CurrentUCSMInstance.Name = "ucs.domain.local"
 $CurrentUCSMInstance.ConnectionInstance = 'CurrentUCSMInstance'
 $CurrentUCSMInstance.Credential = $ucscred
 $CurrentUCSMInstance.UcsUri = "https://ucs.domain.local/nuova"
$CurrentUCSMInstance.Connect()
$chassis = Get-Chassis
Disconnect-UCSM

[/code]


You can see I am using the same creds file and username so nothing has changed accept for how the object was created and passed. Maybe some one from Cisco can explain what their Connect-UCSM cmdlet is doing that is being circumvented by using the Connect() method for the class Cisco.Common.DataTypes.UCSLoginInfo. At least this gives me a work around to allow my scripts to run but keep proper user auditing to see who did what in the audit log while they fix the Connection cmdlet.

Kevin Murphy</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-09-28T21:14:35Z</dc:date>
  </entry>
  <entry>
    <title>Connect-UCSM with LDAP</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4539193" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4539193</id>
    <updated>2011-09-26T22:46:01Z</updated>
    <published>2011-09-26T22:45:52Z</published>
    <summary type="html">Has any one successfully used this cmdlet with an LDAP provider? I am able to do this connect to authenticate to it using SSH, UCS SM and even a custom authetnication function I used to use that relies on the XML funciton aaaLogin but it doesn't use credentials or create the connection object that all the UCS cmdlets reference so it isn't good any more. I was curious if any one else is able to successfully use this cmdlet to authenticate since all I ever get is an Authenticate Failed.
 
 
Connect-UCSM : Authentication failed
At line:6 char:13
+ Connect-UCSM &lt;&lt;&lt;&lt;  UCSNAME -Credential $creds
    + CategoryInfo          : ResourceUnavailable: (UCS connection Error:Stri 
   ng) [Connect-UCSM], Exception
    + FullyQualifiedErrorId : LoginError,Cisco.UCSCmdlet.Commands.Connection. 
   ConnectUCSM</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-09-26T22:45:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Using the Cisco UCS PowerShell toolkit and Invoke-XmlCommand</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4538980" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4538980</id>
    <updated>2011-09-26T21:09:04Z</updated>
    <published>2011-09-26T21:09:04Z</published>
    <summary type="html">So you got a couple options here. You can use Invoke-XmlCommand and return each class or return each individual item by DN.

[code]#Return all objects of class type aaaLdapProvider
Invoke-XmlCommand "&lt;configResolveClass classId='aaaLdapProvider '  inHierarchical='true' /&gt;"
#Return all objects of class type aaaProviderGroup
Invoke-XmlCommand "&lt;configResolveClass classId='aaaProviderGroup'  inHierarchical='true' /&gt;"

or 
#Return a specific item by DN
Invoke-XmlCommand "&lt;configResolveDn inHierarchical='true' dn='sys/ldap-ext/ldapgroup-CN=GROUP,OU=OU,OU=OU,DC=DOMAIN,DC=LOCAL' /&gt;"
[/code]

The problem I have with either of these is that Invoke-XmlCommand returns a generic type of BindableRowCellCollection and doesn't return any subclasses for the object you are returning. For the example of the LDAP Group. There is inner XML for the class LDAPGROUP defining the roles for that group. Keeping with the examples I have used above the LdapGroup has the membership with aaaUserRole which is the inner XML which you wouldn't see in an Invoke-XmlCommand. 

[code]&lt;aaaUserRole childAction="deleteNonPresent" descr="" intId="1563239" name="aaa" rn="role-aaa" /&gt;[/code]

I try and use Invoke-XmlCommand as much as possible nowadays but when I need something and want to make sure I get the sub-class types I use a custom post and use the returned output as XML.

[code][xml] $ldap2 = Push-HTTPPostCommand -target $CurrentUCSMInstance.UcsUri.AbsoluteUri -post "&lt;configResolveDn cookie='$($CurrentUCSMInstance.Cookie)' inHierarchical='true' dn='sys/ldap-ext' /&gt;"[/code]

Doing this returns the full object that you can then browse to get the information. I referenced the sys/ldap-ext object which has the inner XML that makes up all the LDAP. You get some extra information because powershell sees it as an xml document but you can drill down to  $ldap2.configResolveDn.outConfig.aaaLdapEp to see the information. It would probably make sense if you just run it in an ISE and browse the object. Below is the code behind the Push-HTTPPostCommand if you wish to use it:

[code]
function Push-HTTPPostCommand
{
param(
[string]$target = $null,
[string]$post = $null,
[string]$user = $null,
[string]$pass = $null
)
	if (($user -ne $null) -and ($pass -ne $null))
	{
		$username = $user
		$password = $pass

		$webRequest = [System.Net.WebRequest]::Create($target)
		$webRequest.ContentType = "text/html"
		$PostStr = [System.Text.Encoding]::UTF8.GetBytes($Post)
		$webrequest.ContentLength = $PostStr.Length
		$webRequest.ServicePoint.Expect100Continue = $false
		$webRequest.Credentials = New-Object System.Net.NetworkCredential -ArgumentList $username, $password 
		$webRequest.PreAuthenticate = $true
		$webRequest.Method = "POST"
		$requestStream = $webRequest.GetRequestStream()
		$requestStream.Write($PostStr, 0,$PostStr.length)
		$requestStream.Close()

		[System.Net.WebResponse]$resp = $webRequest.GetResponse();
		$rs = $resp.GetResponseStream();
		[System.IO.StreamReader]$sr = New-Object System.IO.StreamReader -argumentList $rs;
		[string]$results = $sr.ReadToEnd();
		return $results;
	}
	else
	{
		return $null
	}
 }
[/code]</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-09-26T21:09:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: Using the Cisco UCS PowerShell toolkit and Invoke-XmlCommand</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4538639" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4538639</id>
    <updated>2011-09-26T17:01:03Z</updated>
    <published>2011-09-26T17:01:03Z</published>
    <summary type="html">Here are some snippets that I use to setup my LDAP in my UCS builds. I had to sanatize it but I believe the variable references are correct. We name our providers the IP of the AD controller it is referencing so $IP would be equal to one of those. Hope it helps give you a good start.

[code]
# Create LDAP Provider
Invoke-XmlCommand "&lt;configConfMo inHierarchical='false'&gt;&lt;inConfig&gt;&lt;aaaLdapProvider basedn='DC=DOMAIN,DC=LOCAL' rootdn='CN=Account,CN=OU,DC=DOMAIN,DC=LOCAL' filter='sAMAccountName=`$userid' name=""$IP"" key=""$account_pass"" enableSSL='yes'&gt;&lt;aaaLdapGroupRule authorization='enable' rn='ldapgroup-rule' targetAttr='memberOf' traversal='non-recursive'/&gt;&lt;/aaaLdapProvider&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"

# Create LDAP Provider Group
Invoke-XmlCommand "&lt;configConfMo inHierarchical='false'&gt;&lt;inConfig&gt;&lt;aaaProviderGroup dn='sys/ldap-ext/providergroup-NAME' name='NAME'&gt;&lt;aaaProviderRef name=""$IP"" /&gt;&lt;/aaaProviderGroup&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"


# Create LDP Group Maps
Invoke-XmlCommand "&lt;configConfMo inHierarchical='false'&gt;&lt;inConfig&gt;&lt;aaaLdapGroup name='CN=GROUP,OU=OU,OU=OU,DC=DOMAIN,DC=LOCAL' &gt;&lt;aaaUserRole name='aaa' /&gt;&lt;/aaaLdapGroup&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"


# Create Authentication Domain
Invoke-XmlCommand "&lt;configConfMo inHierarchical='false'&gt;&lt;inConfig&gt;&lt;aaaDomain name='ProviderGroupName' &gt;&lt;aaaDomainAuth providerGroup='ProviderGroupName' realm='ldap' /&gt;&lt;/aaaDomain&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"
[/code]</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-09-26T17:01:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Invoke-XMLCommand in UCSPS</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4517473" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4517473</id>
    <updated>2011-09-20T16:16:02Z</updated>
    <published>2011-09-20T16:16:02Z</published>
    <summary type="html">Ravi,

The problem with your command is you double quotes (") ends your string so the class type [b]equipmentChassis[/b] isn't surrounded by quotes in the string passed to the XML. You can resolve this either by using an extra double quote when inside a string like ""equipmentChassis"" or by a single quote as Philip did in his example so just 'equipementChassis'.  In my experience, you don't need to include the cookie when using the Invoke-XmlCommand cmdlet as it gets the cookie from the connection object.

I am not sure I understand what you saying when you are trying to set a vnic template type.</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-09-20T16:16:02Z</dc:date>
  </entry>
  <entry>
    <title>childAction="deleteNonPresent"</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4396128" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4396128</id>
    <updated>2011-08-22T07:25:33Z</updated>
    <published>2011-08-22T07:25:17Z</published>
    <summary type="html">Can some one tell me what this property does and if there are other values it can be set to? I apologize if there is another thread on this but I haven't been able to find anything documented on what this is for and I am curious because I suspect it may be tied to what happens if the object or parent object is deleted and references other objects.</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-08-22T07:25:17Z</dc:date>
  </entry>
  <entry>
    <title>Add-VNic and Failover Option</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4369346" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4369346</id>
    <updated>2011-08-16T20:31:13Z</updated>
    <published>2011-08-16T20:28:47Z</published>
    <summary type="html">Does anyone else have issues with the Add-VNIC cmdlet not enabling failover when you set the option to yes? In the below snippet, I pipe in an object from a previously created Service Profile Template and attempt to add a VNIC. The VNIC adds just find but it doesn't matter if I set the -FailOver option to  yes or no, the VNIC is still created without the failover enabled. Is this an error with the cmdlet?
 

$vnic = $SPTemplate | Add-Vnic -VnicName Templates -FI A -FailOver yes -macpool ($OrganizationName + "_MacPool") -NetcntrlPolicyName ($OrganizationName + "_NwCtrlPol") -VLANName '21717_BB_2' -Force

 
Also, why is this cmdlet and the Set version missing the option to configure MTU and Desired Order? Right now I am just sending the XML after the creation of the VNIC to go back and edit those settings if necessary but it seems like the simplest of options to add when compared to VLAN and macpools that require more error checking to make sure those items exist before adding them.
 
Kevin</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-08-16T20:28:47Z</dc:date>
  </entry>
  <entry>
    <title>RE: Invoke-XmlCommand</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4343250" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4343250</id>
    <updated>2011-08-10T16:35:14Z</updated>
    <published>2011-08-10T16:35:14Z</published>
    <summary type="html">Further examples. I was attempting to use Invoke-XmlCommand to create LDAP Providers. I run the command with Invoke-XmlCommand and got no errors or output. It just acted as if nothing happened. I ran it with my custom push and got back an error message saying the filter was wrong:

[code]Invoke-XmlCommand "&lt;configConfMo inHierarchical=""true""&gt;&lt;inConfig&gt;&lt;aaaLdapProvider basedn='DC=DOMAIN,DC=LOCAL' rootdn=CN=OU,DC=DOMAIN,DC=LOCAL' filter='sAMAccountName=$userid' name='x.x.x.x'&gt;&lt;aaaLdapGroupRule authorization='enable' rn='ldapgroup-rule' targetAttr='memberOf' traversal='non-recursive'/&gt;&lt;/aaaLdapProvider&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"[/code]

[code]Push-HTTPPostCommand -target $CurrentUCSMInstance.UcsUri -post "&lt;configConfMo cookie=""$($CurrentUCSMInstance.cookie)"" inHierarchical=""true""&gt;&lt;inConfig&gt;&lt;aaaLdapProvider basedn='DC=DOMAIN,DC=LOCAL' rootdn='CN=OU,DC=DOMAIN,DC=LOCAL' filter='sAMAccountName=`$userid' name='x.x.x.x'&gt;&lt;aaaLdapGroupRule authorization='enable' rn='ldapgroup-rule'  targetAttr='memberOf' traversal='non-recursive'/&gt;&lt;/aaaLdapProvider&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"

&lt;configConfMo dn="" cookie="1312984644/dd2c702c-8059-4354-ae4d-2943681c91c4" response="yes" errorCode="101" invocationResult="unidentified-fail" errorDescr="Incorrect search filter format for provider 10.140.72.135"&gt; &lt;/configConfMo&gt;[/code]

So Invoke-XmlCommand doesn't report all errors returned from the UCS? Luckily using the error returned from my custom function I was able to investigate my string and see that PowerShell was replacing $userid since it saw it as a variable. Once I escaped the $ with a back tick I was able to send the command Invoke-XmlCommand.</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-08-10T16:35:14Z</dc:date>
  </entry>
  <entry>
    <title>Invoke-XmlCommand</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4340957" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4340957</id>
    <updated>2011-08-09T22:22:00Z</updated>
    <published>2011-08-09T20:54:12Z</published>
    <summary type="html">So I read John McDonough's blog post [url=../../../web/unifiedcomputing/blogroll/-/blogs/launch-ucs-kvm-from-a-script?_33_redirect=http%3a%2f%2fdeveloper.cisco.com%2fweb%2funifiedcomputing%2fblogroll%3fp_p_id%3d33%26p_p_lifecycle%3d0%26p_p_state%3dnormal%26p_p_mode%3dview%26p_p_col_id%3dcolumn-1%26p_p_col_count%3d1]Launch UCS KVM from a script[/url] and naturally set out to create a powershell script to do so because it sounded like a cool script. Lately I have been trying to make all my UCS scripts use 100% Cisco provided cmdlets rather than some of my custom ones so I have to use a lot of Invoke-XmlCommand. The final part was to get the authentication token from the UCS. Sending the command over UCS returns null. No errors or anything written to console but taking the exact same XML string and sending it to the UCS over a custom function to send http posts to the UCS returns values. I have tried this with the two cookie attributes added in to the Invoke cmdlet and without them and with any combo of one or the othere. Any idea why the Invoke-XmlCommand doesn't do anything? Is there something different about the method that doesn't work with Invoke-XmlCommand?
 
 
 
[b]$Token = Invoke-XmlCommand "&lt;aaaGetNComputeAuthTokenByDn cookie=""$($CurrentUCSMInstance.cookie)"" inCookie=""$($CurrentUCSMInstance.cookie)"" inDn=""$($SP.pnDn)"" inNumberOf=""2""&gt;&lt;/aaaGetNComputeAuthTokenByDn&gt;"[/b]

Thanks,
Kevin</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-08-09T20:54:12Z</dc:date>
  </entry>
  <entry>
    <title>RE: Powershell Toolkit and PowerGUI</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4261451" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4261451</id>
    <updated>2011-07-22T15:28:09Z</updated>
    <published>2011-07-22T15:28:09Z</published>
    <summary type="html">So a coworker just installed the new version of the UCS cmdlets and he didn't have the issue. I did some digging and it seems PowerGUI caches the help XML files in a path like "C:\Users\%user%\AppData\Local\Quest Software\PowerGUI\Commands\2.4.0.0". In here I saw previous version for my DataONTAP cmdlets and UCS cmdlets so I figured it might be a conflict but that wasn't the face. I opened the XML file inside CiscoUCSPS_x86__en-US_1.1.0.0.xml.gz and all it had was:


 [code]&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
- &lt;configuration&gt;
- &lt;container name="Command Info" id="c1de67e0-10ef-469b-9eee-42fb5563c082"&gt;
- &lt;items&gt;
- &lt;container name="Console Version" id="7b082250-5a98-48f5-8a3f-6ab5f1e4d90e"&gt;
  &lt;value&gt;2.4&lt;/value&gt; 
  &lt;/container&gt;
  &lt;/items&gt;
  &lt;/container&gt;
  &lt;/configuration&gt;[/code]

Obviously we are missing something in here. I replaced this with the working file from my coworker's computer and PowerGUI loaded and recognized the UCS cmdlets. Hope this helps any one else that might have the issue after upgrading the cmdlets.</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-07-22T15:28:09Z</dc:date>
  </entry>
  <entry>
    <title>UCSPE Startup Config URL</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4257464" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4257464</id>
    <updated>2011-07-21T16:58:27Z</updated>
    <published>2011-07-21T16:58:16Z</published>
    <summary type="html">By my understanding you can point the UCSPE at a production UCS and have the emulator pull the production configuration down. I figured this was by setting the UCSPE Startup Config URL but what does it need to point to exactly? I pointed it to the FQDN of a UCS cluster and reset the DB as the page says and nothing changes at startup. I also tried pointing it to the FQDN/nuova and still nothing. Does any one know how to do this or where there might be instructions?</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-07-21T16:58:16Z</dc:date>
  </entry>
  <entry>
    <title>Powershell Toolkit and PowerGUI</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4251543" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4251543</id>
    <updated>2011-07-20T19:57:39Z</updated>
    <published>2011-07-20T19:57:21Z</published>
    <summary type="html">I recently added the new version of the UCS powershell toolkit and do all my scripting using PowerGUI. I import the module and I am able to see that it is there and has exported cmdlets using the get-module command. I can even run the commands and access the help topics for each command but the ability for intellisense seems to have been lost. I know I was able to do this with the previous release. I have tried every way I can think of to add the module including placing the DLLs directly in C:\Windows\System32\WindowsPowerShell\v1.0\Modules. The only thing I can think is something changed in how yall put together your DLL that might be preventing PowerGUI from compiling this information. I figure PowerGUI is pretty widely used, has any one else seen this issue and found away around it?</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-07-20T19:57:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: Creating VLAN using invoke command</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4241936" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=4241936</id>
    <updated>2011-07-19T02:52:55Z</updated>
    <published>2011-07-19T02:52:55Z</published>
    <summary type="html">Hey Jayant,

You made two mistakes that I see. First you are missing a [b]&gt;[/b] ending your [b]&lt;fabricVlan&gt;[/b] tag. Secondly, by my understanding if you use "configConfMos" instead of "configConfMo" then you need to use the &lt;pair&gt; tags. I have two working examples below:

invoke-xmlcommand -xmlstringlist "&lt;configConfMo inHierarchical='no'&gt;&lt;inConfig&gt;&lt;fabricVlan dn='fabric/lan/net-TEST2' id='2' name='TEST2'&gt;&lt;/fabricVlan&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"

or if you use [b]configConfMos[/b]:

invoke-xmlcommand -xmlstringlist "&lt;configConfMos inHierarchical='no'&gt;&lt;inConfigs&gt;&lt;pair key='fabric/lan/'&gt;&lt;fabricVlan dn='fabric/lan/net-TEST2' id='2' name='TEST2'&gt;&lt;/fabricVlan&gt;&lt;/pair&gt;&lt;/inConfigs&gt;&lt;/configConfMos&gt;"


If any one has anything to say I am interested to hear more on the differences. The second example is how I created VLANs before the toolkit.

Maniacmurphy
Community Supporter</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-07-19T02:52:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: Modify Host Firmware Policies</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3988031" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3988031</id>
    <updated>2011-06-01T23:32:38Z</updated>
    <published>2011-06-01T23:32:38Z</published>
    <summary type="html">See I knew there would be a justification for it. That is a bit of a pickle but I would just go ahead and create a blank SP and assign it to the blades and power them on so they get the same firmware package you are using in the rest of the organization. I don't know how you have things laid out in your UCS but this or some variation should work although it assumes you already have a firmware package that you manually created but at least you don't have to push it out by handle to each blade. Also, I am unsure if the UCS pushes out the entire firmware even if no vNICs are apart of the service profile. If it doesn't push out that update because of the lacking components you would need to run the add-vnic or add-vhba commandlets on the Service Profile template. This should create the templates, associate them and power down the blades. Then all you have to do is go back and mass power them off and remove the profiles and template or just do script that too!

[code]
# Reference previously created and configured Host Firmware Policy
$HostFirmwarePolicy = "1.4.2b"

# Create Service Profile Template and configure it to point to the Host Firmware Policy from above variable
$SPtemp = Add-SPTemplate -Org "root/POD60" -SPTemplateName FirmwareTemplate
Invoke-XmlCommand -XMLStringList "&lt;configConfMo inHierarchical=""false""&gt;&lt;inConfig&gt;&lt;lsServer dn=""$($SPtemp.dn)"" hostFwPolicyName=""$HostFirmwarePolicy"" /&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"

# Get all blades not associated to a Service Profile
$unassociatedblades = Get-Blade | where {$_.association -match "none"}

# Foreach blade create a Service Profile and assign it to a blade
foreach ($blade in $unassociatedblades)
{
	$SP = Add-SPFromTemplate -Org "root/POD60" -SPName "FirmwareTemp" -SPTemplateName "FirmwareTemplate" -TemplateOrg "root/POD60"
	Invoke-XmlCommand -XMLStringList "&lt;configConfMo inHierarchical=""false""&gt;&lt;inConfig&gt;&lt;lsServer dn=""$($SP.dn)""&gt;&lt;lsBinding pnDn=""sys/chassis-$($blade.chassis)/blade-$($blade.blade)"" /&gt;&lt;/lsServer&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"
}[/code]</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-06-01T23:32:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Modify Host Firmware Policies</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3987575" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3987575</id>
    <updated>2011-06-01T19:49:59Z</updated>
    <published>2011-06-01T19:49:59Z</published>
    <summary type="html">Hi Sean,

I am just curious why you are wanting to update the blade firmware without having a service profile attached. It is my understanding that the blades can't be used without a service profile attached to it so why go update it if it is going to get updated when you attach a service profile anyway? I am not saying there is not a use case for this I just don't see it and I am curious to learn how other people are using the UCS.

Thanks,
Kevin Murphy</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-06-01T19:49:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: What's the command to assign a Service Profile to a Blade?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3987072" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3987072</id>
    <updated>2011-06-01T17:45:45Z</updated>
    <published>2011-06-01T17:45:45Z</published>
    <summary type="html">Thanks for the info Josh. I was wondering if that would be handled or not but I figured better safe than sorry. That is good to know going forward.

Thanks</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-06-01T17:45:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: What's the command to assign a Service Profile to a Blade?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3986781" />
    <author>
      <name>Kevin Murphy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=2049005&amp;messageId=3986781</id>
    <updated>2011-06-01T16:16:06Z</updated>
    <published>2011-06-01T16:16:06Z</published>
    <summary type="html">Most of my UCS powershell scripts relies on custom functions that would be too much and haven't been tested enough to post here. I am in the process of trying to reformat them to utilize the UCS cmdlets. Here is a section of code that I have used and works. It inputs from a CSV that has headers; Servers,ChassisID,BladeID. Servers is the name of the service profile, the other two are self explanatory...I hope. I utilize the Get-Org cmdlet to save having to input the DN myself incase it was a sub-sub-organization.  Note here, I tried using Get-Org with just an org name and the -recursive option and it didn't return anything. Not sure why so I still have to play with but I have only had these for a couple days.

A comment on Joshua's code. I don't think that will work because he doesn't have all the extra quotations escaped with another set of quotes. So to take just a bit of that line the first quote starts the string but then to the cmdlet that string stops after the first equal sign and no is a separate item and so on. Again this is an assumption and I haven't tested it but from my understanding that line won't work as you would think. I would suggest something like my line below where each quote inside the XML is escaped with another quote. Just food for thought as we begin to explore the use of Invoke-Xmlcommand.

[code]
###### INPUT files  ######
#  $Servers CSV should have headers for Server,ChassisID,BladeID
$Servers = Import-Csv -Path "./inputs/STC21717UCS201.csv"
$org = Get-Org -Org "root/ORGNAME"
foreach ($server in $Servers)
{
	$xmlcmd = "&lt;configConfMos cookie=""$($CurrentUCSMInstance.Cookie)"" inHierarchical=""false""&gt;&lt;inConfigs&gt;&lt;pair key=""$($org.dn)/""&gt;&lt;lsServer dn=""$($org.dn)/ls-$($server.server)""&gt;&lt;lsBinding pnDn=""sys/chassis-$($server.chassisID)/blade-$($server.BladeID)"" /&gt;&lt;/lsServer&gt;&lt;/pair&gt;&lt;/inConfigs&gt;&lt;/configConfMos&gt;"
	Invoke-XmlCommand -XMLStringList $xmlcmd
}[/code]</summary>
    <dc:creator>Kevin Murphy</dc:creator>
    <dc:date>2011-06-01T16:16:06Z</dc:date>
  </entry>
</feed>

