Custom attribute in the patch ACS4.2 17

I have an optional custom attribute in my ACS group to pass on ACE config mode: shell: Admin * Admin by default-field

Privilege level 15 is also part of the configuration of the exec.

Recently I applied the patch 17 on ACS 4.2 (0) build 124. Since then I can not connect with the level of privilege 15 in IOS routers/switches.

Looks like IOS box considers this attribute custom as a mandatory now.

---------------------------------------------------------------------------------------------------

Debugging IOS (Cat6500, 12.2 (33) SXJ4):

May 27, 13:23:56.819: MORE: application created for 61929 (pehruby)

May 27, 13:23:56.819: MORE: previously set server group Ganymede 10.105.24.44 +.

May 27, 13:23:56.819: HIGHER (0000F1E9) / 550052 A-4/NB_WAIT/0: started 5 sec timeout

May 27, 13:23:56.819: HIGHER (0000F1E9) / 0/NB_WAIT: made event 2

May 27, 13:23:56.819: HIGHER (0000F1E9) / 0/NB_WAIT: 62 bytes written requests

May 27, 13:23:56.819: HIGHER (0000F1E9) / 0/READING: made event 1

May 27, 13:23:56.823: HIGHER (0000F1E9) / 0/READING: would block during playback

May 27, 13:23:56.823: HIGHER (0000F1E9) / 0/READING: made event 1

May 27, 13:23:56.823: HIGHER (0000F1E9) / 0/READING: read all 12 byte header (wait for data 51 bytes)

May 27, 13:23:56.823: HIGHER (0000F1E9) / 0/READING: made event 1

May 27, 13:23:56.823: HIGHER (0000F1E9) / 0/READING: read all the answer 63 bytes

May 27, 13:23:56.823: HIGHER (0000F1E9) / 0 / 550052 A 4: the package of treatment response

May 27, 13:23:56.823: MORE: handled AV priv-lvl = 15

May 27, 13:23:56.823: MORE: could not decode a unknown AV hull: FAIL

May 27, 13:23:56.823: HIGHER (0000F1E9) / 0/REQ_WAIT / 550052 A 4: expired

May 27, 13:23:56.823: MORE: Protocol is set to None. Jump

May 27, 13:23:56.823: MORE: AV = shell shipping service

May 27, 13:23:56.823: MORE: sending AV cmd *.

ACS TCS.log (different time, same attempt):

TC 27/05/2013 11:59:39 I 0043 5088 0 X 15< packet="" to="" client:10.106.11.114="" type:author/pass_add,="" seq="" 2,="" flags="">

TC 27/05/2013 11:59:39 I 0043 5088 0 X 15 SESSIONID-998342923 (0XC47E7EF5), DATALEN 51 (0 X 33)

TC 27/05/2013 11:59:39 type I 0043 5088 0 x 15 = AUTHOR/RESPONSE status = 1 (AUTHOR/PASS_ADD)

TC 27/05/2013 11:59:39 I 0043 5088 0 x 15 msg_len = 0, data_len = 0 arg_cnt = 2

TC 27/05/2013 11:59:39 I 0043 5088 0 x 15 size arg [0] = 11 = priv-lvl = 15

TC 27/05/2013 11:59:39 I 0043 5088 0 x 15 size arg [1] = 32 = shell: Admin * Admin by default-field

TC 27/05/2013 11:59:39 I 0043 5088 0 x 15 end >

------------------------------------------------------------------------------------------------------------------------

Debugging IOS (C1841, 12.3 (14) T7):

May 30, 12:21:58.248: AAA/BIND(00000A52): link i / f

12:21:58.272 30 may: AAA/AUTHOR (0xA52): list of selection method "acs."

12:21:58.272 30 may: MORE: AAA Queuing 2642 authorization for treatment

12:21:58.272 30 may: HIGHER: processing of the application for authorization id 2642

12:21:58.272 30 may: MORE: Protocol is set to None. Jump

12:21:58.276 30 may: MORE: AV = shell shipping service

12:21:58.276 30 may: MORE: sending AV cmd *.

12:21:58.276 30 may: MORE: application created for 2642 (ph)

12:21:58.276 30 may: MORE: previously set server group Ganymede 10.105.24.44 +.

12:21:58.276 30 may: HIGHER (A 00000, 52) / 656FB000/NB_WAIT/0: started 5 sec timeout

12:21:58.276 30 may: HIGHER (A 00000, 52) / 0/NB_WAIT: made event 2

12:21:58.276 30 may: HIGHER (A 00000, 52) / 0/NB_WAIT: 59 bytes written requests

12:21:58.276 30 may: HIGHER (A 00000, 52) / 0/READING: made event 1

12:21:58.276 30 may: HIGHER (A 00000, 52) / 0/READING: would block during playback

12:21:58.280 30 may: HIGHER (A 00000, 52) / 0/READING: made event 1

12:21:58.280 30 may: HIGHER (A 00000, 52) / 0/READING: read all 12 byte header (wait for data 51 bytes)

12:21:58.280 30 may: HIGHER (A 00000, 52) / 0/READING: made event 1

12:21:58.280 30 may: HIGHER (A 00000, 52) / 0/READING: read all the answer 63 bytes

12:21:58.280 30 may: HIGHER (A 00000, 52) / 0/656FB000: the package of treatment response

12:21:58.280 30 may: MORE: handled AV priv-lvl = 15

12:21:58.280 30 may: MORE: could not decode AV shell: Admin * Admin by default-field - PASS - PASS

May 30, 12:21:58.284: AAA/AUTHOR/EXEC(00000A52): AV cmd = treatment

May 30, 12:21:58.284: AAA/AUTHOR/EXEC(00000A52): successful authorization

ACS.log:

TC 30/05/2013 12:21:58 I 0043 1280 0 X 0< received="" from="" client:10.106.0.50="" type="AUTHOR," seq="1," flags="">

TC 30/05/2013 12:21:58 I 0043 1280 SESSIONID 0 X 0 1990425999 (0X76A37D8F), DATALEN 47 (0X2F)

TC 30/05/2013 12:21:58 I 0043 1280 type 0 x 0 = AUTHOR, priv_lvl = 1, authentic = 1

TC 30/05/2013 12:21:58 I 0043 1280 0 x 0 METHOD = Ganymede +.

TC 30/05/2013 12:21:58 I 0043 1280 SVC 0 X 0 = 1 USER_LEN = 2 PORT_LEN = 6 REM_ADDR_LEN = 12 ARG_CNT = 2

TC 30/05/2013 12:21:58 I 0043 1280 0 x 0 USER = ph

TC 30/05/2013 12:21:58 I 0043 1280 PORT 0 x 0 = tty195

TC 30/05/2013 12:21:58 I 0043 1280 0 X 0 = 10.106.33.22 REM_ADDR

TC 30/05/2013 12:21:58 I 0043 1280 0 x 0 arg [0](size=13) = service = shell

TC 30/05/2013 12:21:58 I 0043 1280 0 x 0 arg [1](size=4) = cmd *.

TC 30/05/2013 12:21:58 I 0043 1280 0 X 0 END >

TC 30/05/2013 12:21:58 I 0850 3244 1 allocated connection wire work unique 0xf

TC 30/05/2013 12:21:58 I 0143 3244 0xf author data: phtty19510.106.33.22service = shellcmd. = 13362timezone = MEZservi

TC 30/05/2013 12:21:58 I 0163 3244 0xf - excerpts from the info service

TC 30/05/2013 12:21:58 I have 0189 3244 0xf - Checked NARs

TC 30/05/2013 12:21:58 I 0199 3244 0xf - implemented Reqs:

TC 30/05/2013 12:21:58 I 0209 3244 0xf - a profile

TC 30/05/2013 12:21:58 I 0261 3244 0xf - executed

TC 30/05/2013 12:21:58 I 0263 3244 0xf - set of controls done clean

TC 30/05/2013 12:21:58 I 0265 3244 0xf - version NDG provided

TC 30/05/2013 12:21:58 I 0043 3244 0XF< packet="" to="" client:10.106.0.50="" type:author/pass_add,="" seq="" 2,="" flags="">

TC 30/05/2013 12:21:58 I 0043 3244 SESSIONID 0XF 1990425999 (0X76A37D8F), DATALEN 51 (0 X 33)

TC 30/05/2013 12:21:58 I 0043 3244 0xf type = AUTHOR/RESPONSE status = 1 (AUTHOR/PASS_ADD)

TC 30/05/2013 12:21:58 I 0043 3244 0xf msg_len = 0, data_len = 0 arg_cnt = 2

TC 30/05/2013 12:21:58 I 0043 3244 0xf arg [0] size = 11 = priv-lvl = 15

TC 30/05/2013 12:21:58 I 0043 3244 0xf arg [1] = 32 = shell size: Admin * Admin by default-field

TC 30/05/2013 12:21:58 I 0043 3244 0xf end >

PuTTY session:

Connect as: ph

[email protected]/ * / password:<------ (10.106.0.16="" and="" 10.106.0.50="" are="" ip="" addresses="" of="" the="" same="">

1841_hra_lab >

1841_hra_lab ><------ i'm="" not="" in="" enable="" mode="" (priv.level="">

--------------------------------------------------------------------------------------------------------------------

Unfortunalety I don't have newspapers/debug of the period before the update, when everything was ok.

I guess that the problem is somewhere in this argument that goes from the ACS to the customer:

TC 30/05/2013 12:21:58 I 0043 3244 0xf arg [1] = 32 = shell size: Admin * Admin by default-field

Can someone tell me how this argument with the option setting should look like?

Maybe * shell: Admin * Admin by default-field?

Petr

Hi Peter,

You are using in a default.

CSCth75577    ACS incorrectly sends optional custom attributes GANYMEDE +.

Symptom:

Authorization GANYMEDE + IOS fails if client attributes (even as an option) are configured on the ACS user group.  The connection will work, but the attributes passed will be not honored.

Conditions:

ACS 4.2.0.124 patch 16

ACS 4.2.1.15 patch 2

Workaround solution:

Return to a previous fix ACS.

This problem has been fixed in

ACS 4.2.1.15 patch 3 or later.

Upgrade of the ACS to 4.2.1.15 and apply the latest patch 10.

Jatin kone
-Does the rate of useful messages-

Tags: Cisco Security

Similar Questions

  • Custom attribute in the model layer properties

    Hey all,.

    Can someone explain the flow of the program "ADF practice: using custom attribute in the model layer properties of". "" Basically, how change custom properties like "customLabel" changed the label attribute. Is there properties specific adf we can refer to properties for the attribute?

    Reference will also be useful.

    Thank you!!

    What exactly you want to know?

    It's pretty clear from what I've read:

    You can set properties that are customized for each attribute in a vo. This is done in the vo attributes dialog box where the default value.

    You can override the default values that is done in the setCustomHints() method. This method is called by the button in the user interface (actionListener = "#{bindings.setCustomHints.execute}" ")

    The inputtext is set to display the properties for the label (label = "#{bindings.") DepartmentName.hints.customLabel}') and uses the custom readOnly property (readonly = "#{bindings.") DepartmentName.hints.readonly}')

    As the inputText component is updated after the button clicked on (via a pertial in the inputText trigger), it shows the a values.

    Timo

  • OVD Plugin Custom - attribute of the user LDAP recovery

    Hi all

    I develop a plugin for OVD.

    My goal is to retrieve the value of an attribute (for example, "attribut1") when you call a proxy service, who authenticate with a user of TPM.

    For example, I have the user "user1" in OVD and my Proxy Service is called using the credentials of that user. When this happens, my custom plugin is called (since it is attached to my LDAP adapter) and I need access to 'attribute1' value of ID "User1" and calling a WebService with this value.

    Can you please tell me:

    1. In what method should I apply this (get, postSearchEntry, etc...)
    2. How can I get the value of the attribute of this user

    Thank you very much.

    Hello

    Yes, I booted and I could not recover all the information of the DN. In the end, I did the following:

    try {
      chain.nextBind(creds, dn, password, result);
      } catch (DirectoryException e) {
      throw e;
      }
    
    Vector searchAttributes = new Vector();
    
    DirectoryString ldapUsernameDs = new DirectoryString("myattribute");
    searchAttributes.add(ldapUsernameDs);
    
    ChainVector results = new ChainVector();
    chain.getVSI().get(chain.getRequest(), creds, dn, new Int8((byte) 0), ParseFilter.parse("(objectClass=*)"), new Bool(false), searchAttributes, results);
    
    if (results.size() > 0) {
    
    EntrySet es = (EntrySet) results.get(0);
      Entry entry3 = es.getNext();
    
    Vector ldapUsernameValue = entry3.get(ldapUsernameDs);
    Syntax ldapUsernameSyntax = (Syntax) ldapUsernameValue.get(0);
      ldapUsername = ldapUsernameSyntax.toString();
    }
    

    The code needs some improvement, but the idea is there, and it works. Something wrong with it?

  • Custom attribute OAM in the Workflow Manager user

    I need to add a custom attribute (defined in the person object class) to the User Manager workflow. I'm administrator of Master and I could see objectclass and attribute in the current configuration-> tab objectclass.
    But when I try to install 'Attribute Access Control', I don't see a custom attribute in the list.
    can you please how to make available in the workflow custom attribute?

    Thank you

    If you use OID, check if the attribute is indexed.

  • Reporting to include custom attributes of Vm and organized through multiple vcenters.

    Hello
    We are just moving our production test vfoglight solution & have you come across a bit of a weird one. We had a report / discovers that would list all virtual machines in our virtual Center and displays the custom attributes in a nice - good for the management report, form etc. However, we are moving to a new instance of virtual center & we have a test instance too - all are present in vfoglight, but our report draws only the custom of the original vcentre attributes. I'm not wcf script guru, but I gave it a good look & can't see a way forward - the hero of any script out there who could take a look and help out?
    Moreover, do you think I could put in a request for support for this one & get any joy?

    Hope someone can help - I'll post all the files needed etc.

    Kind regards

    Jonathan

    Thought of it at the end - on the second vcenter vmware foglight agent did not have the ability to collect custom attributes in the service.config file set to true. After true and restart the collector and the connector, everything was fine.

  • Retrieves a custom attribute and store it in a workflow attribute?

    Hello.

    Maybe I'm confused on this subject, but from the looks of it, I can't take the custom attribute that is retrieved using

    com.vmware.library.vc.customattribute.getCustomField)

    and assign it to an attribute of workflow for use later, or even check the value.

    From the looks of the workflow, it records only the value.

    Is it possible to natively in vRO?

    Thank you!

    Anoop

    Are you trying to retrieve the custom attribute using the workflow "toget the attribute custom" (in the folder library/vCenter/Custom attributes )?

    If so, then Yes, this workflow only saves the retrieved attribute and does not return as an output parameter. You have the following options:

    • Write your own workflow to help "get the attribute custom" as a starting point. You can duplicate, then add a new parameter of type string and set it to the value of customAttributeValue.
    • Directly call the com.vmware.library.vc.customattribute.getCustomField () action in your script code and use its return value of string.
  • LDAP Sync does not work on custom attributes

    Gurus,

    I installed and configured OIM 11 g release 2. During configuration of IOM, I activated ldapsync to OID.

    Created a custom attribute in the OID and also on OIM. But when I change this attribute to IOM, this change won't OID and vice versa. There are no errors in the logs.

    Please throw some light on this.

    Everything by creating a custom to IOM, attribute entitle you the label, name... At the same time, there will be an option to provide the ldap attribute name. You must provide the name of the attribute that you created in the OID here. Then only ldap sync works on custom attributes. without specifying a ldap attribute name, ldap sync wiill does not work.

    Give it a try and post your results here.

  • PowerCLI need to define global attributes on the hosts

    PowerCLI need to define global attributes on the hosts... Please, I beg you. ESXi4.

    The name is easy in the user interface as long as it applies to all hosts in the global inventory, but I want to be able to set or change the value of the attribute on a per host-level or a cluster.

    Thanks for any help!

    I have

    To create global custom attributes that you use

    New-CustomAttribute -Name MyCustomAttribute
    

    To set a global custom attribute for the hosts, you can use

    New-CustomAttribute -Name MyCustomAttribute -TargetType VMHost
    

    If you want to set or change the value of the attribute for a specific host, you can do

     Set-CustomField -Name MyCustomAttribute -Value "MyValue" -Entity (Get-VMHost )
    

    If you want to change the value for all hosts in a cluster, you can do

    Get-Cluster  | Get-VMHost | Set-CustomField -Name MyCustomAttribute -Value "MyValue"
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Attributes custom VM * without * the cartridge speed

    I am running v6.7.1 which does not support the older cartridges.  What is the procedure for creating a service for custom attributes that are installed in vCenter?  Blog with the method of carriage speed, it looks like 6.7.1 should already be collecting data.  How one can access this data to include in reports and create services for him?

    I removed the scope of the derivative of the cartridge to avoid performance problems.  You can find rules in the cartridge.

    https://www.dropbox.com/s/nhr2lz6g7gff0dw/velocity-7_2_1.car

    OR...

    You can download just the groovy and script that run from the console/script editor or implement a rule as well.  Just edit the desired custom attribute name for the service for.

    https://www.dropbox.com/s/mqqbvf5855u12ke/createServicesFromCustomAttributes.Groovy

  • Change after the addition of custom attribute

    Hello

    I use OIM R2 PS1 and the commissioning of OUD user via the connector.

    Depending on the condition, I added a new custom attribute "HomePhone". However, the value of attribute for this attribute is only pushed for the newly created user. For a user (prior to adding the custom attribute), the attribute values runs not more than on the side of the OUD.

    Is there a planner that I need to run?

    Thank you, John

    Hello

    I'm sure that you have not finished the second part of the extension of connector - "Configurations to achieve synchronization app downstream." However, you mentioned that you don't see a problem with the new user, however if you update the value of the attribute, it does not flow down to OUD, as older users.

    Please go through the link: extend the functionality of the connector

    The steps would be - creating new tasks within the definition of processes, mapping, etc..

    Thank you.

  • Unable to get the values of the attributes of the Annotation VM Notes and Custom (product)

    Hi Experts,

    Need help to enter the values of the following custom attribute annotation is my script. No problem collecting other information.

    below is the codes where im having issues. There is no output for the VM Notes and the product.

    @{N = "VM Notes";} E={$_. Summary.Config.Annotation}},

    @{N = ' product'; E = {$key = $_.} AvailableField | where {$_.} Name - eq 'Product'} | Select the key - ExpandProperty

    $_. CustomValue | where {$_.} Key - eq $key} | {{Select - ExpandProperty value}}.

    Below is the script when the above code is integrated.

    $vCenterServerName = "test.com"

    SE connect-VIServer $vCenterServerName - xxx-xxxx password user

    $SMTPServer = "xxxx".

    $ToAddress = "xxxxx".

    $FromAddress = $vCenterServerName + "@xxx.com.

    $Subject = ' report VMPath for all VMs in vcenter - tpe.corp.kazootek.com.

    $date = get-Date-format-M - d - yyyy

    $reportlocation = "C:\test\vcenter-xxx-vmpath-$date.csv".

    $vmFields = ' Name ',' Parent ',' Config.Template ',' Runtime.Host ',' ResourcePool ',' Config.Hardware ',' Summary.Storage ',' Runtime.Powerstate ',' Summary.Config.Annotation '.

    # $report = C:\test\tpe_mate1.csv - UseCulture | %{

    $report = get-View - ViewType VirtualMachine-property $vmFields | %{

    $esx = get-view-id $_. Runtime.Host - name of the property, material

    $_ | Select Name,

    @{N = "VM Notes";} E={$_. Summary.Config.Annotation}},

    @{N = ' product'; E = {$key = $_.} AvailableField | where {$_.} Name - eq 'Product'} | Select the key - ExpandProperty

    $_. CustomValue | where {$_.} Key - eq $key} | {{Select - ExpandProperty value}}.

    @{N = 'Template'; E={$_. Config.Template}},

    @{N = 'Center'; E = {}

    $obj = get-view-Id $_. ResourcePool-name of the Parent property

    While ($obj - isnot [VMware.Vim.Datacenter]) {}

    $obj is get-view $obj. Parent - the Parent property name

    }

    $obj. Name

    }},

    @{N = "Cluster"; E = {}

    $obj = get-view-Id $_. ResourcePool-name of the Parent property

    While ($obj - isnot [VMware.Vim.ClusterComputeResource]) {}

    $obj is get-view $obj. Parent - the Parent property name

    }

    $obj. Name

    }},

    @{N = 'Host'; E = {$esx. Name}},

    @{N = "NumCpu"; E={$_. Config.Hardware.NumCpu}},

    @{N = "MemoryGB"; E = {[int]($_.)} Config.Hardware.MemoryMB/1KB)}}.

    @{N = "ProvisionedSpaceGB"; E = {($_.Summary.Storage.Committed+$_.Summary.Storage.Uncommitted)/1 GB)}},

    @{N = "Powerstate"; E={$_. Runtime.PowerState}},

    @{N = "Path"; E = {}

    $current = get-view-Id $_. Parent - the Parent property name

    $path = $_. Name

    {}

    $parent = $current

    if($parent.) Name - only "vm") {$path = $parent. {Name + "\" + $path}

    $current is get-view $current. Parent - the Parent property name

    } While ($current. Parent - no $null)

    [channel]: join ('-',($path.)) Split('\') [0.. ($path). Split('\'). (Count-2)]))

    }},

    @{N = "FolderId"; E={$_. Parent.ToString ()}}.

    @{N = "Manufacturer"; E = {$esx. Hardware.SystemInfo.Vendor}},

    @{N = ' model'; E = {$esx. Hardware.SystemInfo.Model}},

    @{N = "ProcessorType"; E = {$esx. Hardware.CpuPkg [0]. Description}}

    }

    # }

    $report | Export-Csv $reportlocation - NoTypeInformation - UseCulture

    Write-Host "Report exported to csv file" + $reportlocation

    Send-Mailmessage-to $FromAddress - to $ToAddress - subject $Subject - $reportlocation - SmtpServer $SMTPServer attachments

    Write-Host "report was sent by E-mail to '$ToAddress' to ' $FromAddress

    You must add the $vmFields variable AvailableField and CustomValue

    $vmFields = ' Name ',' Parent ',' Config.Template ',' Runtime.Host ',' ResourcePool ',' Config.Hardware ',' Summary.Storage ',.

    'Runtime.Powerstate ',' Summary.Config.Annotation ',' AvailableField', ' CustomValue.

  • Create a custom attribute to model the growth rate of the data store used space

    I would like to see data warehouses are growing fastest of the environment in terms of GB per day or something similar.  Is it possible to use a custom attribute to apply a formula that measures the rate of growth of a store of data over time, which allows me to see what data stores fastest?

    You would look for an average simple mobile for a SM you describe. vC Ops does not simple moving average formulas for SMs at this time.

    Looks like you are looking for a "growth rate", but you really won't get it with the built-in attributes. You might look differently and look at the remaining capacity and the remaining time metric. Also, you could create additional widgets to view graphs of util % over the last 30-90 days to give a better picture of usage in GB, #VMs, etc.

    I also suggest to make a Top - N showing use the lowest of the remaining time metric and the remaining ability... This will give you your data warehouses that are more at risk.

  • Someone removed the custom attributes field

    Is it possible that PowerCLI can fire an event if someone removed the field of the custom in vCenter attributes?  I take more precisely on the class in Administration > custom attributes in vSphere client 5.x.  For some reason a field that he had to show VM assignments is missing, and I'll try to find what happened to her.

    Course, use the CustomFieldRemovedEvent.

    You can use the Get-VIEvent or my Get-VIEventPlus cmdlet to retrieve the events.

    BTW use my Event-O-Matic to easily find event names.

    Special Edition, it will still generate code to extract the events

  • Include the attribute custom report using the disc

    I'm to customize a script provided by Alan Renouf in his PowerGUI Powerpack.  The script I'm customization in the Powerpack is named 'VM disk sizes.

    His screenplay does everything we need from a point of view of output except that we can also include a custom attribute (Custom Field) VM as well as the information of the disk space.  I have included the below custom script, please note that this is a script/PowerGUI PowerPack we customize but was initially written and provided by Alan Renouf and all credit for this original work must be given to Alan.

    I have included our custom below script and have "in bold Red" line in the script that does not work:

    $AllVMs = get-View - ViewType VirtualMachine. Where {-not $_.} Config.Template}
    $SortedVMs = $AllVMs | Select *, @{N = "NumDisks"; E={@($_. Guest.Disk.Length)}} | Sort-Object-down NumDisks
    {ForEach ($VM to $SortedVMs)
    $Details = new-object PSObject
    $Details | Add-Member-Name name-value $VM.name - Membertype NoteProperty
    $Details | Add-Member - MemberType NoteProperty-name CustomFields-value (($VM.)) CustomFields | %{"$($_. Key) = $($_.) (Value)'}) - join ',')
    $DiskNum = 0
    Foreach ($disk in $VM. Guest.Disk) {}
    $Details | Add-Member-name "drive$ ($DiskNum) path"-MemberType NoteProperty-value $Disk.DiskPath
    $Details | Add-Member-Name "Disk$ ($DiskNum) Capacity (MB)"-MemberType NoteProperty-value ([math]: round ($disk.) Capacity / 1 MB))
    $Details | Add-Member-Name "Disk$ ($DiskNum) FreeSpace (MB)"-MemberType NoteProperty-value ([math]: round ($disk.) FreeSpace / 1 MB))
    $DiskNum ++
    } # end foreach nested
    $Details.PSTypeNames.Clear)
    $Details.PSTypeNames.Add ('Virtu-al'.PowerPack.VMGuestDisks) '
    $Details.PSTypeNames.Add ('Virtu-al'.PowerPack.VM) '
    $Details
    } # end foreach

    When you use the Get view as seen on the first line of the script, it appears the CustomField information not available in the generated view.  How to develop the view to include CustomFields/CustomAttributes for each virtual computer in our environment and then report on their subject?

    Please let me know if I did a poor job explaining the scenario and what I'm after here.  Any help is greatly appreciated!

    Hello, jSun311-

    Yes, you are right - there is no such thing as the "CustomFields" property on a managed object VirtualMachine .  You can always get the names and the corresponding values of the custom fields, you just have a little.  For example, you could change the line to:

    ...## make a comma-separated string that holds the custom field key/value pairs, like "cust0 = myValue0,cust1 = myDateInfo"$Details | Add-Member -MemberType NoteProperty -Name CustomFields -Value (($VM.Value | %{$oCustFieldStrValue = $_; "{0} = {1}" -f ($VM.AvailableField | ?{$_.Key -eq $oCustFieldStrValue.Key}).Name, $oCustFieldStrValue.Value}) -join ",")...
    

    and you should be happy as a clam.

    BTW, this call Get-view on your first line could be optimized a little using the - Filter parameter, like:

    $AllVMs = Get-View -ViewType VirtualMachine -Filter @{"Config.Template" = "false"}
    

    Pretty minimal in this case, but can be very useful in other scenarios of Get-View.  And, you may want to retrieve only the properties of the managed VirtualMachine object that you plan to use, so that the memory usage is reduced to the minimum, speed is optimized, etc. (do you this by using the - Get-mode property param).

    Anyway, how does do for you?

  • Change the VM with custom attributes defined in a CSV file

    Hi all

    I'm doing something that I think should be simple (but this is the first time I used powercli and am not a good code writer), but I find it hard to tell.

    I created 2 custom attributes (owner and owner of the SSG system) in vCenter for my virtual machines.  I have a list of vm names csv and their associates "owners".  I would use powercli to read the csv file and connect to the VC server and the 'owners' of entry in the appropriate field.

    I borrowed com code from various places on the internet and these forums but I can't seem to make it all work.  I managed at least to read the information in the csv file and is displayed on the screen of my laptop.  What I can't do is get 3 columns in the csv file to be recognized as variables (unless there is some default variables I don't know) I can put in the game-Annotation lines.

    The code I have is:

    # Input range, includes all IBD VM names that are registered.
    $data = import-Csv "C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\vmowners1.csv"-Header ('Hostname', 'Owner', 'SSG owner')
    # $data | Get-Member
    Write-Output $data
    # Loop over all the VMS in vCenter
    ForEach ($row in $data)
    {
    # Create variables for the current virtual and its 'Contact' and 'Description' computer that are custom attribute fields.  Also create a $note string to use Set-VM-Description
    $hostname = get-VM-name $vmname;
    # $contact = $vm | Get-Annotation CustomAttribute - user;
    # $description = $vm | Get-Annotation - CustomAttribute Description;
    # $note = $contact.name + ":'t" + $contact.value + "' not n" + $description.name + ":'t" + $description.value;
    Set Annotation - entity $hostname - CustomAttribute "Business system owner" - value $SSG_owner
    Set Annotation - entity $hostname - CustomAttribute "SSG system owner" - value $system_owner
    # Set - VM - VM $vm - $note Description - confirm: $false;
    }

    The result, I get on my screen is:

    PowerCLI C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts >.\setvmownership.ps1

    Owner of the company that owns SSG host name

    --------                                              --------------                                       ---------

    ABPPROXY-00-AH

    ACE-01-AH hung Laallmmi hung Laallmmi

    Get - VM: could not validate the argument on the parameter 'name '. The argument is null or empty. Provide an argument that is not null or empty, and then try the AGM of the order

    in.

    To C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:13 char: 29

    + $hostname = get-VM-name < < < < $vmname;

    + CategoryInfo: InvalidData: (:)) [Get - VM], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:17 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "Business system owner" - value $SSG_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:18 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "SSG system owner" - value $system_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    Get - VM: could not validate the argument on the parameter 'name '. The argument is null or empty. Provide an argument that is not null or empty, and then try the AGM of the order

    in.

    To C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:13 char: 29

    + $hostname = get-VM-name < < < < $vmname;

    + CategoryInfo: InvalidData: (:)) [Get - VM], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:17 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "Business system owner" - value $SSG_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:18 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "SSG system owner" - value $system_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    The CSV file looks like this (but continues for about 500 VMS):

    I go with the option import-csv because that said something that I read in my troubleshooting efforts would empty columns and error I received and that import-csv correctly would intrepret in empty columns.

    hostname, business_owner, system_owner,

    ABPPROXY-00-AH,

    ACE-01-AH, James Laallmmi, James Laallmmi,

    acrodev-00-ah, tflessa, Bruce Hastings,.

    ACT1DDB00AH, Bill Mancini, Mike Bruni,

    ACT1TDB00AH, Bill Mancini, Mike Bruni,

    What should I do to be able to get this script to work? I don't know that it is related to messages "argument is null." that we see in the output.

    Thank you

    Dan

    Hello, dscottimw-

    You were on the right track.  There were a couple of things to change to make it work as you want:

    1. either remove the "-header" part of the Import-Csv line or delete the actual header of the CSV itself - these are elements in conflict (the "-Header" param names of the columns in the CSV and assumes that the CSV file has already no header row)
    2. you need to access the properties of the $row variable in the ForEach loop - not only call the names of the CSV column headers (this is why you may receive errors on things 'null' - whether you use variables that have no value)

    Try this:

    # Input array, includes all VM names from DCI that are registered.$arrVMsInfo = Import-Csv "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\scripts\vmowners1.csv"#Write-Output $data
    
    ## loop through all VMs listed in the CSV, setting custom attrib values for eachForEach ($row in $arrVMsInfo) {    ## get the VM for this row    $vmThisOne = Get-VM -Name $row.hostname    Set-Annotation -Entity $vmThisOne -CustomAttribute "Business System Owner" -Value $row.business_owner    Set-Annotation -Entity $vmThisOne -CustomAttribute "SSG System Owner" -Value $row.system_owner} ## end foreach
    

    And, to give it a shot without actually play the game on annotations, to make sure things go as you like, you could add a - WhatIf to each line in Set-Annotation in the ForEach loop.

    Which works better for you?

Maybe you are looking for

  • Pavilion x 2 10-n156na: Connector for charging the battery

    I recently bought this product and it will not load upward. It seems that the connector of money on the side of my Tablet inside is loose. This has now come away with the charger and I can't work on how the get connected in so that allows me to recha

  • Can't empty trash in El Capitan

    Hello! I deleted a user account from my MacBook. That's happened. But the procedure left some files on my drive. I moved to the trash. When I try to empty the trash, I get the following error codes: "the operation cannot be completed because an unexp

  • complete the recursive operation on Subvi after clone a VI

    Hello. I use Labview 8.5. I want to do a re-entrant execution on a VI (clone).  This VI has several Subvi. I would like to know if I have to place a check mark in the box of the reeentrant of each Subvi execution or if the option is performed automat

  • Realtek High Definition Audio

    where can I get Realtek High Definition Audio device for my pc?

  • Office Professional 2007 - installation Windows XP

    Bought the new Office Professional 2007 and installed on my laptop. Installation went smoothly, but am unable to activate due to an error message telling me I have an invalid product key. I uninstalled and installed twice with no success. Tried activ