Return of ID data store

I'm trying to write a script that returns the ID of the data store. For example

____________________________________________________________

$datastore = get-Datastore. Where-Object {$_.} {Name - notlike "local"}

{ForEach ($ds in $datastore)

$Id = $ds | Select the Id

Write-Host $Id

}

____________________________________________________________

The result is:

@{Id = Datastore-datastore-15}

I wish that the exit number 15 or datastore-15. I don't know there is some string manipulation, I do just need to understand that, but what I've also been wondering is there a way to return this information without having to manipulate the output?

If you are using PowerCLI 4.1 you can do:

$datastore = Get-Datastore | Where-Object {$_.Name -notlike '*local*'}
ForEach ($ds in $datastore) {
   $dsMoRef = New-Object VMware.Vim.ManagedObjectReference -ArgumentList $ds.Id
   Write-Host $dsMoRef.Value
}

Kind regards

Yasen Kalchev

PowerCLI Dev Team

Tags: VMware

Similar Questions

  • Write-Host returns the correct value of the data store while Export-CSV does not work

    Hi team

    I use the attached script to get vcenter inventory. Everything works fine but the output to one gives CSV value like datasore ' VMware.Vim.VirtaulMachineConfigInfoDatastroreUrlPair [of] "instead of the actual data store name.

    But when I do a write-host in the end (instead of export to CSV) I can't find the name of data reflecting properly store.

    Can someone help me understand what Miss me?

    Thanks in advance.

    Olivier ONE

    The problem is that the virtual machine can have several data warehouses and the DatastoreUrl is an object, not a string.

    Try changing:

    $Report.DatastoreName = $VMview.Config.DatastoreUrl

    in:

    $Report.DatastoreName = [string]: join ('',($VMview.Config.DatastoreUrl |) Select-Object name - Expandproperty))

  • root properties in the connected data store: error when accessing the date/time storage

    When you browse the properties my connected data store I get an error message when you try to read the value of the property of 'storage date/time': object doesn't support this property or method.

    Here is a minimal example:

    Dim oMyDataStore, MyProperty, oMyProperties
    Set oMyDataStore = Navigator.ConnectDataStoreByParameter ("TOC", "" & "C:\Program Files (x 86) \National 2012\Examples\Data\Example_data.tdm" & "" ')
    Set oMyProperties = oMyDataStore.RootElements (1). Properties
    For each MyProperty in oMyProperties
    Call MsgBoxDisp ("property name:" & MyProperty.Name & + "\n"&"property value:" & MyProperty.Value "")
    Next

    Why can I not access this particular property by default?

    Hi Phex,

    for the date/time properties, an object called UsiTimeDisp is returned. This object allows to that extend features of service as access to each part separately (day, year, hour, seconds,...) of your date/time value. If you want to print the value of time with MessageBoxDisp, you can use the VariantDate this object property.

    Your code might look like this then:

    Dim oMyDataStore, MyProperty, oMyProperties
    Set oMyDataStore = Navigator.ConnectDataStoreByParameter ("TOC", "" & "C:\Program Files (x 86) \National 2012\Examples\Data\Example_data.tdm" & "" ')
    Set oMyProperties = oMyDataStore.RootElements (1). Properties
    For each MyProperty in oMyProperties
    MyProperty.DataType = eTime Then
    Call MsgBoxDisp ("property name:" & MyProperty.Name & + "\n"&"property value:" & MyProperty.Value. ' ") VariantDate)
    On the other
    Call MsgBoxDisp ("property name:" & MyProperty.Name & + "\n"&"property value:" & MyProperty.Value "")
    End If
    Next

    I hope this helps.

    Good day

    Eva

  • Getting property of type 'Date' from a PDO data store

    It is therefore a question of both parties.  Part A: when I search for data in a data store, to find data by using the object Navigator returns the correct number of results, using the object. GetElementList does not work.  I'm looking in the data store for steps created between a certain date (using the iStartTime property).  It seems that they must return the same results.  Please see part A of my code pasted below.  Any suggestions?  Perhaps it is - that it is related to part B of my question.

    Part b: iStartTime property is the data type 30, or of type Date.  When I try to access the value of the property of iStartTime I got an error stating that ' the object does not support this property or method ".  Is there a special way to get the value of a property when the property is a date?

    Any suggestion would be appreciated!

    -Russ

    Option Explicit  ' force explicit declaration of all variables in a script.
    Dim MyElementList, oMyDataStore, StartDate, EndDate, MySearchString

    MyDataStorePlugin Sun: myDataStorePlugin = 'PDO '.
    MyDataStoreParam Sun: myDataStoreParam = "AVL7D667E7B1EBFBAB6736F66010CCAB1AC8CB28FD2ROCMSAPP01600000000YESYESYESauto"
    Set oMyDataStore = Navigator.ConnectDataStoreByParameter (myDataStorePlugin, myDataStoreParam)

    StartDate = Cdate (DateAdd("d",-3,Date)) + TimeSerial (0,0,0)
    EndDate = Cdate (DateAdd("d",0,Date)) + TimeSerial (23,59,59)

    '------------------------------------------------------------------------------------------------------------------------------------------------
    ' PROBLEM A: THESE TWO SEARCH SHOULD BE THE SAME, BUT THEY RETURN DIFFERENT results.
    "This returns zero search results."
    Set MyElementList = oMyDataStore.GetElementList ("Action", "iStartTime > =" & StartDate & ") iStartTime<=" &="">
    MsgBox ("GetElementList count:" & MyElementList.Count)

    «That returns 18 results»
    Dial the navigator. Display.CurrDataStore.Browser.refreshALL
    Call Navigator.Display.CurrDataStore.QueryForm.Clear
    Call Navigator.Display.CurrDataStore.QueryForm.Conditions.Add("Measurement","iStartTime",">=",Startdate) ' here is where I add a new condition.
    Call Navigator.Display.CurrDataStore.QueryForm.Conditions.Add ("action", "iStartTime" "<=",EndDate) 'here's="" where="" i'm="" adding="" a="" new="">
    Navigator.Display.CurrDataStore.QueryForm.Conditions.Logic = "C1 AND C2.
    Navigator.Display.CurrDataStore.ResultsList.Elements.MaxCount = 10000
    Call Navigator.Display.CurrDataStore.QueryForm.Search () ' and that triggers the search according to my requirements and the data store I went.
    MsgBox ("browser search count:"& Navigator.Display.CurrDataStore.ResultsList.Elements.Count ")

    '------------------------------------------------------------------------------------------------------------------------------------
    «PROBLEM B: iStartTime IS DATA TYPE 30 OR DATE TYPE.» HOW TO ACCESS THE VALUE?

    MsgBox ("identification data type:" & Navigator.Display.CurrDataStore.ResultsList.Elements.Item (1).) Properties.Item ("Id"). DataType) "Message:" data type Id: 3 ""
    MsgBox ("Id value:" & Navigator.Display.CurrDataStore.ResultsList.Elements.Item (1).) Properties.Item ("Id"). Value) "Message:" Id value: 266888 ""

    MsgBox ("iStartTime data type:" & Navigator.Display.CurrDataStore.ResultsList.Elements.Item (1).) Properties.Item ("iStartTime"). DataType) "Message:" type of identification data: 30 ""
    MsgBox ("iStartTime value:" & Navigator.Display.CurrDataStore.ResultsList.Elements.Item (1).) Properties.Item ("iStartTime"). Value) ' results in error, the object does not support this property or method

    Sorry, I've replaced iStartTime by measurement_begin to make it work on my local database :-)

    The point is that the syntax of GetElementList is the following

    "iStartTime > = 20121201033; iStartTime<>

    When converting a CDate to str it cause string locale-dependent.

    But the suggestion would be to use the

    Dim query: query = oMyDataStore.CreateQuery set

    instead of the query string. Because he avoid conversion errors. Be aware that even a double value to a string in Germany for example will convert a written decimal number while the stringquery expects at this point notation.

    Set MyElementList = oMyDataStore.GetElementList ("Action", "measurement_begin > =" & RTT (StartDate, "#YYYYMMDDhhnnss") & ") measurement_begin<=" &="">

    must provide correct results.

  • Search by wildcard characters in the data store

    I'm trying to search with a wildcard in a PDO data store.

    This produces a result:

    Back EMF Date: time 2012-08-20: 14:16:04

    But that does not

    Return *.

    How can I use wildcards in a search for data store?

    I guess that all of the following conditions must create correct results

    Dim query: query set = store. CreateQuery
    query. ReturnType = "measure".
    query. Conditions.Add 'Measure', 'name', 'is', ' back. "
    store. Search (Query)

    store. GetElementList ("Action", "name = % rear", true)

    store. GetElementList ("Action", "name = back *", false)

    store. GetElementList ("Action", "name = back *")

    Please take into account the fact that the PDO does not support case-insensitive query.

    I assume you are using an AVL Puma. You may need to set a switch in advanced the PDO connection dialog box. 'Use as instead of GAME'.

    In the connection setting, it appears as

    YES

  • I need a few persistent data store help of Pentecost

    Hi, I have a problem, try to store persistent data, I m using Eclipse 3.4.2 and BlackBerry plugin, as I check my work with the correct laboratory and my code hasn´t issues only a warning I see on the laboratory code it s normal, but when I try to run the Simulator I get this:

    "Eception exception: lack of measurement of the resource.

    and this is the code

    package com.rim.someguy;
    
    //Import section
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.util.*;
    import net.rim.device.api.i18n.ResourceBundle;
    import java.util.*;
    
    public class measure extends UiApplication implements measureResource{
    
        //Variables for user interface fields
        private EditField numMeasureDev;
        private AutoTextEditField observation;
        private EditField lecture;
        private ObjectChoiceField choice;
        private EditField date;
    
        //Persistent data
        private static Vector data;
        private static PersistentObject store;
    
        //Resource bundle variable
        private static ResourceBundle _res;
    
        //MAIN
    
        public static void main(String[] args){
            measure app = new measure();
            app.enterEventDispatcher();
        }
    
        //Save Menu
        private MenuItem saveItem = new MenuItem(_res, SAVE, 110, 10){
            public void run(){
                StoreInfo nfo = new StoreInfo();
                nfo.setElement(StoreInfo.NUM, numMeasureDev.getText());
                nfo.setElement(StoreInfo.LEC, lecture.getText());
                nfo.setElement(StoreInfo.DAT, date.getText());
                nfo.setElement(StoreInfo.SEL, _res.getString(choice.getIndex()));
                nfo.setElement(StoreInfo.OB, observation.getText());
                data.addElement(nfo);
    
                //Storing data
                synchronized(store){
                    store.setContents(data);
                    store.commit();
                }
                Dialog.inform(_res.getString(APP_SUCCESS));
                numMeasureDev.setText(null);
                lecture.setText(null);
                date.setText(null);
                choice.setLabel(null);
                observation.setText(null);
            }
        };
    
        //Get Menu
        private MenuItem getItem = new MenuItem(_res, GET, 110, 10){
    
            protected int index;
    
            public void run(){
                synchronized(store){
                    data = (Vector) store.getContents();
                    LabelField label = new LabelField();
                    label.setText("Selecciona el dato a mostrar: ");
                    BasicEditField bef = new BasicEditField();
                    index = Integer.parseInt(bef.getText());
                    if (!data.isEmpty()){
                        StoreInfo nfo = (StoreInfo) data.elementAt(index);
                        numMeasureDev.setText(nfo.getElement(StoreInfo.NUM));
                        lecture.setText(nfo.getElement(StoreInfo.LEC));
                        date.setText(nfo.getElement(StoreInfo.DAT));
                        choice.getIndex();
                        observation.setText(nfo.getElement(StoreInfo.OB));
                    }
                }
            }
        };
    
        //Persistent Object
        static{
            //Resource Bundle
            _res = ResourceBundle.getBundle("measure");
    
            //Get the reference to PersistentObject and set value to Vector if is empty
            store = PersistentStore.getPersistentObject(0xdec6a67096f833cL);
            //key is a hash
            synchronized(store){
                if (store.getContents() == null){
                    store.setContents(new Vector());
                    store.commit();
                }
            }
        }
    
        //Class created for a persistent object StoreInfo
        private final static class StoreInfo implements Persistable{
    
            //Data for elements
            private Vector elements;
    
            //Fields
            public static final int NUM = 0;
            public static final int LEC = 1;
            public static final int SEL = 2;
            public static final int OB = 3;
            public static final int DAT = 4; 
    
            //in StoreInfo, add a new empty Vector with capacity of 4 elements and persist
            public StoreInfo(){
                elements = new Vector(5);
                for(int i = 0; i < elements.capacity(); ++i){
                    elements.addElement(new String(""));
                }
            }
    
            //Retrieve Vector element
            public String getElement(int id){
                return (String) elements.elementAt(id);
            }
    
            //Set Vector Element
            public void setElement(int id, String value){
                elements.setElementAt(value, id);
            }
        }
    
        //Measure constructor declaration
        public measure(){
    
            //Create a main screen
            MainScreen mainS = new MainScreen();
            mainS.setTitle(_res.getString(APPLICATION_TITLE));
            numMeasureDev = new EditField(_res.getString(TEXT1),"",
                    Integer.MAX_VALUE, EditField.FILTER_NUMERIC);
            lecture = new AutoTextEditField(_res.getString(TEXT5),"",
                    Integer.MAX_VALUE, EditField.FILTER_NUMERIC);
            date = new EditField(_res.getString(TEXT6),"");
            choice = new ObjectChoiceField(_res.getString(TEXT2),_res.getStringArray(OPTION));
            observation = new AutoTextEditField(_res.getString(TEXT3),"");
    
            //Adding elements to Screen
            mainS.add(numMeasureDev);
            mainS.add(lecture);
            mainS.add(date);
            mainS.add(choice);
            mainS.add(observation);
    
            //Adding menuItems to menu
            mainS.addMenuItem(saveItem);
            mainS.addMenuItem(getItem);
    
            //Push all elements to screen
            pushScreen(mainS);
        }
    }
    

    If anyone knows what I m hurt you showme how please!

    Two thoughts:

    1. If you have changed somehow the object type that you want to keep, you must remove the Simulator files before running again.
    2. How about you provide a clue as to where the class cast exception that happens? You are more likely to help in this way.
  • ODI file data store

    Hi all

    I have a confusion about the physical and logical length in the ODI file data store.

    I have a fixed-width file where a c2 col had datatype as string (30).

    I've set this column in the data as string store > physical length 30 > logic length 30

    My interface failed with error as '.

    ORA-12899: value too large for column 'S0_IDM '. «C$ _0S0_EAGLE_DWHCDC_CHRG_MST ".» "" "C2_CHARGE_DESC" (real: 31, maximum: 30).

    When I increased the logical length to 255, the interface worked fine.

    Being always the same 30 physical length.

    How different is it?

    Any help on this will be appreciated.

    Thanks and greetings

    Reshma

    This isn't the official documentation, but here's my point of view, after a few moments of reflection

    Everything you do in the ODI Designer is inspired by the logical architecture. Only when running it manifested in a physical implementation i.e. connection strings are materialized etc. When you perform an integration ODI creates usually a few temporary tables prefixed with C$, I$ etc to be able to perform the necessary data movement and the transformations needed to, for example, to fill a data target (table) store. In your example, your flat file is materialized in such a temporary table before that its content is manipulated (or not) and loaded in the target data store. When ODI generates this code that he uses the logical length emitted in the DDL that generates temporary table column lengths, the physical column is ignored.

    Now in your scenario is not a problem as constraints such as these do not matter to the physical file version knowledge if you were to write to the file, that it would not matter if you wrote return 255 characters or 31. This could be a problem if you were using database tables and varying the logical vs physical lengths but generally you reverse engineer tables from database using ODI rather than manually doing so makes better.

    Anyway, in short, I think that the logical lengths should be taken as representative which will manifest itself in the materialization of the temporary objects used to manged / transform the data from the source models (tables$ CAN) and target (I have tables$) while the physical lengths indicate what the underlying physical representation of these models are in reality.

    EDIT: after reading some logical documentation actually represents the length while physics is related the number of bytes required to store the data. Therefore, you could have a situation with multibyte characters where the physical length could be greater than the logical length but not really the other way around.

  • List of virtual machines in the data store that is not in stock

    Hi guys

    PowerCLI rookie here, sorry for the stupid questions.

    I'm trying to clean up a bunch of singehost with local data warehouses. So I need a script that can display a list of files of virtual machine on a data store that is not used by VMs in the inventory. One of the problems is that the files on the data store, isn't every means, named exactly the same as the virtual machine in the inventory.

    Summer watching this, but I think the term "orphan" is "sent, in my view, it is:

    https://communities.VMware.com/thread/266913

    Also it is - this one, I think that I should be able to change it to do what I want:

    http://www.wooditwork.com/2011/08/11/adding-VMX-files-to-vCenter-inventory-with-PowerCLI-gets-even-easier/

    Any tips or hints to push me in the right direction would be appreciated.

    Please try:

    $AllFilesLocalDatastore = get-data store 'localdatastorename ' | Get-fileindatastore

    $FilesIdentifiedAsAssociatedToAllVMs = get-FilesIdentifiedAsAssociatedToAllVMs

    #The two functions above are available here http://thecrazyconsultant.com/find-orphaned-vmdk-files-workflow/

    Check the contents of the two variables for example with VGO or export-csv

    $AllFilesInESX01LocalDatastore | OGV

    Try:

    $FilesNotIdentifiedAsAssociatedToAnyVM = $AllFilesLocalDatastore | {foreach-object

    $FullPath = $_. FullPath

    If ($FilesIdentifiedAsAssociatedToAllVMs.FileName - notcontains $FullPath) {}

    Return $_

    }

    }

    $FilesNotIdentifiedAsAssociatedToAnyVM | OGV

    #The over a will contain all the files that are not identified as associated with any virtual computer

    $ProbablyOrphanedFiles = $FilesNotIdentifiedAsAssociatedToAnyVM | where {$_.} FileTypeFullName-match "VMware.Vim.Vm *"-GOLD ($_.) FileTypeFullName - eq "VMware.Vim.FileInfo" - AND ($_.) FullPath-match ".vmsd" - or $_. FullPath-match ".vmxf" - or $_. FullPath-match "aux.xml" - or $_. FullPath-match ".vswp" - GOLD ($_.) FullPath-match "hard" - AND $_. FullPath - notmatch 'ctk.vmdk') - GOLD ($_.) FullPath-match ".vmx" - AND $_. FullPath - notmatch ".vmx ~"- AND $_. FullPath - notmatch "." VMX.lck")))}

    $ProbablyOrphanedFiles | OGV

    Edit:

    Changed the name of the data store, it seems that he was not supposed to be in the first screenshot.

    Edit2:
    The first command control switch, more details in the last post in this thread

  • get support scsi LUNS for the data store?

    I've been delving into the different classes available to HostSystem.queryHostConnectionInfo () and none of the properties appear to contain the id of naa I see when I look at LUNS on an HBA.  How do you get to LUN support for a data store?

    Figured it out.  For anyone else who wants to know:

    I created two actions, one to return a hash of the id of naa-online data store object and another action to return a hash of the naa-online drive scsi id

    // actions
    //getDatastoresKeyedByLUN
    var o_diskHash = new Properties();
    
    for each (var scsiDisk in u_host.config.storageDevice.scsiLun)
    {
      //System.log("-> LUN: " + scsiDisk.canonicalName);
      for each (var dataStore in u_host.datastore)
      {
      if (dataStore.info.hasOwnProperty("extent"))
      {
      for each (var scsiDiskPartition in dataStore.info.vmfs.extent)
      {
      if (scsiDiskPartition.diskName == scsiDisk.canonicalName)
      {
      o_diskHash.put(scsiDisk.canonicalName, dataStore);
      }
      }
      }
      }
    }
    
    return o_diskHash;
    
    // getScsiDisksKeyedByLUN
    var o_diskHash = new Properties();
    
    for each (var scsiDisk in u_host.config.storageDevice.scsiLun)
    {
      o_diskHash.put(scsiDisk.canonicalName, scsiDisk);
    }
    
    return o_diskHash;
    
    // in workflow
    for each (var can in dstoreMap.keys)
    {
      System.log(dstoreMap.get(can).name + "(" + lunMap.get(can).canonicalName + ")");
    
    }
    
  • Disk groups are not visible cluster. vSAN datastore exists. 2 guests (on 8) cluster do not see the vSAN data store. Their storage is not recognized.

    http://i.imgur.com/pqAXtFl.PNG

    http://i.imgur.com/BnztaDD.PNG

    Do not know how even tear it down and rebuild it if the disk groups are not visible. The discs are in good health on each host storage adapters.

    Currently the latest version of vCenter 5.5. Hosts running 5.5 build 2068190

    Just built. Happy to demolish and rebuild. Just do not know why it is not visible on the two hosts and the disk groups are only recognized 3 guests when more are contributing. Also strange that I can't get the disk groups to fill in vCenter. I tried two different browsers (chrome and IE).

    I have now works.

    All the identical 5.5 relies on ESXi hosts. All hosts are homogeneous CPU/sum of the prospects for disk controller / installed RAM/storage.

    I have work. I had to manually destroy all traces of the vSAN on each single to help host node:

    (1) put the hosts in maintenance mode and remove the cluster. I was unable to disable vSAN in the cluster, I made on each node host (manually via the CLI below) then disconnected web client vCenter and return to finally refresh the ability to disable on the cluster.

    esxcli vsan cluster get - to check the status of each host.

    esxcli vsan cluster drop - the vSAN cluster host.

    storage of vsan esxcli list - view records in the individual host group

    esxcli vsan storage remove-d naa.id_of_magnetic_disks_here - to remove each of the disks in the disk group (you can ignore this using the following command to remove the SSD only falling each disc in this host group).

    esxcli vsan storage remove s naa.id_of_solid_state_disks_here - this is the SSD and all the magnetic disks in a given disk group.

    After that, I was able to manually add hosts to the cluster, leave maintenance mode and configure the disk groups. Aggregated data of the vSAN data store is correct now, and everything is functional.

    Another question for those of you who still read... How to configure such as the VM storage strategy that migrates towards (or inspired) the vSAN data store will immediately resume the default storage policy, I built for VSANs?

    Thanks for anyone who has followed.

  • VM shows this in the NFS data store after passed to the vmfs data store

    Hello

    (1) create a virtual machine using NFS datastore

    (2) had created a few snapshots

    (3) to migrate this virtual machine from the data to the local VMfs store

    (4) all the files are moved to the defined vmfs datastore

    (5) storage > > nfs_datastore > > objects > > VM > > vm is present

    (6) but when did change the setting of this VM, vm is present on the data store local vmfs

    The .vmsn file contains binary data text, so you better not change it manually. The purpose of these files is to be able to return to his instant partner. Depending on the configuration of virtual machines in time you created the snapshot, the virtual machine may require access to the old data store to access the files and folders in there when you return to this snapshot.

    André

  • Move the location of the VM swap file in another data store

    Hi all

    Was in a task to move the 1000 to the file location of VM swap on another data store which is newly assigned to Exchange us to the existing store database file that will be decommissioned.

    Eager to check if anyone has made movement swap of VM location of the files to a data store to another and that all measures taken to move.

    Require some VM downtime?

    Thanks in advance a ton.

    Yes it is possible without interruption of service to virtual machines.

    1. make sure that your cluster is configured to use swap data store specified by host

    2. take a host in the cluster in maintenance mode, change the location of the VM configuration file to point to the new data store

    3. do this for all hosts in the cluster

    When you vMotion a VM from one host to another the swap file will get moved to the new data store. Later when you take guests to the maintenance and return output mode, vMotion occurs for each computer in the cluster virtual and file is moved.

  • Try to re-signing and mount a data store

    Hi all

    I'm stuck trying to develop a "workflow" and hoping you can help. We need to make a daily DR copy of a production database and edit this copy on another virtual machine. The database feeds a hard with his own logic unit number and is heavily used, so we can suspend only wrote a few minutes.


    Here are the high-level workflow:

    1. Suspend the entries in the database
    2. Create a virtual copy (snapshot) of the LUN on our 3PAR
    3. Resume database entries
    4. Export (present) the virtual copy of the 3PAR to the ESXi cluster
    5. A rescan storage on all hosts in the cluster
    6. Add the LUN and re-signature of the data store
    7. Mount the VMDK from the new LUN to the VM test

    I fight a bit to make the portion of ESXi work. I can re-scan storage successfully on my host, but I'm not able to go up and re-signing of the data store newly discovered. Onyx told me to use resignatureUnresolvedVmfsVolume_Task , but the action failed with "TypeError: cannot find the resignatureUnresolvedVmfsVolume_Task function in the object (Instance) DynamicWrapper: [VcHostSystem]-[class com.vmware.vmo.plugin.vi4.model.VimHostSystem]" I run 5.5.2 vRO/vCO and don't have the library installed vi4 nor do I have all the actions that will be re-signing a volume.

    So I wonder, ResignatureUnresolvedVmfsVolume_Task has been deprecated and replaced by something else? Or did someone knows a library/plugin that I can add to vRO who will give me the opportunity to re-signing a data store?

    Thanks in advance for any help.

    See you soon!

    Hello

    The error message, it seems you are trying to call the method resignatureUnresolvedVmfsVolume_Task() on the object of type VcHostSystem. something like that

    var task = hostSystem.resignatureUnresolvedVmfsVolume_Task(spec);
    

    The problem is that resignatureUnresolvedVmfsVolume_Task() is not a method of type VcHostSystem, but in VcHostDatastoreSystemcharacters, therefore, you get this error.

    To fix it, you must obtain an object of type VcHostDatastoreSystem. Research in the API Explorer, you should be able to get VcHostDatastoreSystem object VcHostSystem object through the configManager property (which returns an object of type VcHostConfigManager), then property of datastoreSystem . Something like the following code:

    var task = hostSystem.configManager.datastoreSystem.resignatureUnresolvedVmfsVolume_Task(spec);
    

    I don't have a good environment to test, but it should work.

    I hope this helps.

  • Removal of LUNS in a data store

    I installed a new volume of virtual disk of three 2 TB (RAID5) SAS drives on our HP SAN. So I have 4TB as the disk capacity that LUN. Now I was ignorant of the fact that the maximum size of a data store for ESXi 4.1 2 TB - 512 bytes. So when I added this new 4 TB LUN to a store of data on ESXi 4.1.0, only 1.64 TB has been appearing as available as against 4 TB or 3.64 to capacity. Now, I want to delete this new LUN of this data store and return to the utility of HP storage to recreate smaller i.e. two 2 TB LUN management. However, the problem I have is, I don't know how to remove this new LUN in the data store to which I added this without losing data or a data store. In my case, I had a data store 300 GB to 1.09 and I added this new 1.64 TB LUN to this Datastore.But I want to delete this LUN data store. Thank you, Clément

    I'm afraid there is no way taken in charge to remove a measure from a data store. If you want to use the entire disk space, you must destroy the entire data store.

    André

  • Data store to the way policy script host

    Hi all

    I use this little script to identify the host LUN political path and status, but hoped someone could help to change the LUN list with a naa starting with naa.600500* and rather than list the lunName data store name?

    $lunpathinfo = @()
    foreach ($vmhost in get-cluster "CLUSTER" | get-vmhost) {
    $hostview
    = to seen $vmhost. id
    $hostview
    . config . StorageDevice . multipathinfo . lun | % { `
    $lunname = $_.id
    $lunpolicy = $_.policy.policy
    $_.path | % {
    $pathstate = $_.pathstate
    $lunpathinfo += ' | Select @{name = "Hostname"; expression = {$vmhost.name}}.
    @{name = "LunName"; expression = {$lunname}},
    @{name = "LunPolicy"; expression = {$lunpolicy}},
    @{name = "PathState"; expression = {$pathstate}}
    }
    }
    }
    $lunpathinfo | Export-csv c:host_luns.csv

    Hello, nicholas1982-

    You can also retrieve the CanonicalName of LUN, so as to then be able filter on them.  You can do filtering in the script foreach block, or, probably a more reusable way, return the CanonicalName as property and then filter on this subject.  So, as:

    &{foreach ($vmhost in Get-Cluster "CLUSTER" | Get-VMHost) {    ## the .Net View of this host, with just a select set of properties    $hostview = Get-View $vmhost.id -Property Config.Storagedevice.Multipathinfo.Lun,Config.Storagedevice.ScsiLun    $hostview.Config.Storagedevice.Multipathinfo.Lun | % {        ## the Lun "key" of this HostMultipathInfoLogicalUnit, to be used to get the corresponding ScsiLun of the same Key, so as to get the CanonicalName of the LUN        $strThisMPInfoLun_LunKey = $_.Lun        $lunname=$_.Id        $lunpolicy=$_.Policy.Policy        $_.path | % {            New-Object -Type PSObject -Property @{                Hostname = $vmhost.Name                LunName = $lunname                LunPolicy = $lunpolicy                PathState = $_.Pathstate                ## the CanonicalName of the ScsiLun that corresponds to this HostMultipathInfoLogicalUnit                LunCanonicalName = ($hostview.Config.Storagedevice.ScsiLun | ?{$_.Key -eq $strThisMPInfoLun_LunKey}).CanonicalName            } ## end new-object        }    }}} | ?{$_.LunCanonicalName -like "naa.600500*"} | Export-Csv -NoTypeInformation -UseCulture  c:\Temp\host_luns.csv
    

    As well as the new property, I changed things a bit:

    1. past the exit the ScriptBlock objects, for more later use/handling/filtering/etc.
    2. update the call to Get-View to retrieve only the specified properties (the properties actually used and necessary), for the love of speed

    How to make this good for you?

Maybe you are looking for

  • My Mac Pro is not turn on; There is power at the output, light or sound when I push the button 'on '. Any suggestions? Thank you

    My Mac Pro is not turn on; There is power at the output, light or sound when I push the button 'on '. Any suggestions? Thank you

  • New printers this fall

    I just read on the eprinters again this fall that will allow you to print from your smartphone. Sounds really cool. I was wondering if the software will be available for older printers wireless HP, like the HP Photosmart Premium Touchsmart Web printe

  • Error "No Preview" unable to view photos available

    Original title: no preview available for Photos. I downloaded my camera photos to "my pictures". I then created a folder in which I transferred photos. I then merged this new folder with an existing folder by "slip & fall.» When I try to view picture

  • change your Email address on the computer.

    I recently moved and changed my e-mail address (server) and the service provider.  Now when I try to attach files to my current e-mail that they are always attached to my old email address (server) and the computer does not allow files or electronic

  • FW v/s IPS

    Hi, on our production site, we installed ASA 5505 but ASA 5505 does not support the IPS feature. Can I know why we need IPS feature that we can handle all the traffic to and through the firewall. Can you please show the difference in terms of layers