Filtering the data names with the prefix donotuse store

Hi all

Currently, we are conducting PowerShell command using the cmdlet Get-data of the below automation tool store. The request is to give the number of logical unit available in the cluster. But we need to edit the script even to retrun lun without donotuse in his name.

New-VIProperty-name availableMB - value-Datastore-ObjectType {$ds = $args [0]; $sum = 0; if ($ds.} ExtensionData.summary.uncommitted - gt 0) {$sum = $ds. ExtensionData.summary.uncommitted}; $sum = $ds. ExtensionData.summary.freeSpace - $sum;  $sum = $sum/1024/1024; Return $sum} - Force

(Get-Cluster-name ${vCenterCluster} |) Get - VMhost) | Where-Object {$_.availableMB - ge (${diskSize} * 1024 + ${reservedSpace} * $_.)} CapacityMB) - and $_. CapacityMB - ge (${lunSize} * 1024)- and $_. {Name: like "* _lun *"} | Sort-Object availableMB | Select - 1 first

Please provide your inputs.

For example: If there is one named xxxx_lun01donotuse or donotusexxxx_lun01 we do not want this lun to be returned by the script.

Thanks and greetings

Riyas Hussain has

Far as I can tell you are not feeding datastore objects to the Where clause, so you cannot test on the properties of the data store in the Where clause.

You can feed the objects produced by Get-data store to the Where clause (see my previous answer)

Tags: VMware

Similar Questions

  • Name of the data connection with ConsoleDeviceName and CanonicalName store

    Hi people,

    I would like to connect 3 parameters, ConsoleDeviceName, CanonicalName, and 'name of the data store.

    The first two times (ConsoleDeviceName, CanonicalName) can I get with ' Get-VMHost "MyESXHost |" Get-ScsiLun.

    But how can I get the name of the data store?

    http://communities.vmware.com/servlet/JiveServlet/downloadImage/7964/12-9-2009+1-11-11+PM.png

    Thanks for help

    Hello

    In order to get the name of the data store for each unit number logical you should review the information of measurement of the disk for each data store attached to the host and link them using canonical names of lun. VMFS datastore disk measurement information are available in the HostScsiDiskPartition object. Here's a code example how to do this:

    $h = Get-VMhost "MyESXHost"
    
    # collect VMFS datastore name and extent cannonical names into a hashtable
    $dsLunList = @{}
    $dsView = $h | Get-Datastore | ? {$_.Type -eq "VMFS"} | Get-View
    foreach ($ds in $dsView) {
         foreach ($diskExtent in $ds.Info.Vmfs.Extent) {
              $dsLunList[http://$diskExtent.DiskName|http://$diskExtent.DiskName] = $ds.Info.Name
         }
    } 
    
    #populate datastore name for each lun if available
    $lunList = @()
    $h | Get-ScsiLun | % {
         $lun = "" | select ConsoleDeviceName, CanonicalName, DatastoreName
         $lun.ConsoleDeviceName = $_.ConsoleDeviceName
         $lun.CanonicalName = $_.CanonicalName
    
         if ($dsLunList.ContainsKey($_.CanonicalName)) {
              $lun.DatastoreName = $dsLunList[http://$_.CanonicalName|http://$_.CanonicalName]
         }
    
         $lunList += $lun
    }
    
    $lunList
    

    Kind regards

    Yasen

  • Creation of VM in local ESXi datastore for the backup of the data SAN with VMXNet 3 VM store

    Hi all

    I would like to know how you have configured your server to backup as a virtual machine?

    My idea is to use the local data VMFS3 store on my 3 x ESXi servers,

    by installing the application of part 3 (such as Veeam Backup 5 or Backup Exec 2010) in Windows Server 2008 R2 VM

    equipped with size of very big hard drive (OS 8 GB + 1 TB VMDK data partition) on each of the local data store to save the computer virtual within the SAN.

    What I have:

    VMware vSphere essential 4 - ESXi 4.0 (not hot add)

    Dell Power Edge 2950 with 2.5 to multiple VMFS3 extended on top - RAID 5 (6 x 500 GB SATAII 7200 RPM)

    Reference Dell MD3000i iSCSI SAN on Gigabit Ethernet

    The configuration of the Windows Server 2008 R2 VM:

    2 x CPU @ 2.33 GHz

    4 GB OF RAM

    VMXNet3 NIC-> for better connectivity to the backup between the local data store ESXi and iSCSI-SAN data store.

    Here's the reason why I'm doing this is that:

    1. I don't have the additional NETWORK card to connect my physical server in iSCSI SAN THAT switch, so I can't use - SAN backup mode.

    2. I only use the available lowest VMware license that can't stand the Hot-add the device function.

    Would it be an optimal configuration?

    Any kind of help and suggestion to implement backup VM VM would be greatly appreciated.

    Thank you.

    Kind regards

    AWT

    From what I see of you think to do, you will get no advantage of using the VMXNET3 NIC, compared using an e1000 NIC... All your traffic will be on the connections of 1 GB, because you're leaving SAN local disk... If you had the VM on the SAN, or the same storage, the VMXNET3 NIC were going at speeds of internal circulation (could get you better than 1 GB, but I advise to test before committing)...

    In addition, you will not be able to use a volume of OS 8 GB in Server 2008 R2... Bare minium is 32 GB (use plus 40 GB, which is that vSphere will use when you tell him to 2008 R2 for the operating system of the virtual machine)...

    VMware VCP4

    Review the allocation of points for "useful" or "right" answers.

  • Problem with the filtering of data

    Hello!

    I have a problem with filtering the data in my table and don't know how to solve it properly.

    I created a tabular presentation, my table, a few text fields that are used as input for the various columns of the filter and a filter button that submits the page.

    The problem appeared when I try to filter a column that has null values in the table and is editable... it's that I have found.
    When I press the button I get no line, although there should be some.

    It's the submitted query:

    Select

    "MSR_PRD_ID,"

    "SRC_STM_ID,"

    "ID."

    "ISIN"

    ...

    of ' #OWNER # '. " IZV_SLOG_DET ".

    WHERE

    Lower (MSR_PRD_ID) = low (nvl (: P7_X_MSR_PRD_ID, MSR_PRD_ID)) and

    Lower (SRC_STM_ID) = low (nvl (: P7_X_SRC_STM_ID, SRC_STM_ID)) and

    lower (ISIN) = low (nvl (: P7_X_ISIN, ISIN)) and

    ...

    The nvl function is used so that if the user leaves the field blank it filters by fields that have entry only.

    Does anyone know how I could get around this?


    Kind regards

    Ivan

    LOWER (NVL (ISIN, 'Y')) = LOW (NVL (: P7_X_ISIN, BASS (NVL (ISIN, 'Y'))))

    Denes Kubicek

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

    http://deneskubicek.blogspot.com/

    http://www.Apress.com/9781430235125

    https://Apex.Oracle.com/pls/Apex/f?p=31517:1

    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494

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

  • Script of VM inventory for VM name with the location, the name of the Cluster and data storing total size and free space left in DS.

    Hello

    I wanted to collect script inventory VM VM name with location, name of the Cluster and data store total size and free space left in Datastore.I have script but his mistake of shows during its execution. Any help on this will be apreciated.

    Thank you

    VMG

    Error: -.

    Get-view: could not validate the argument on the parameter "VIObject". The argument is null or empty. Provide an argument that is not null or empty, and then try
    the command again.
    E:\script\VM-DS-cluster.ps1:7 tank: 20
    + $esx = get-view < < < < $vm. Runtime.Host - name of the Parent property
    + CategoryInfo: InvalidData: (:)) [Get-view], ParameterBindingValidationException)
    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView

    Get-view: could not validate the argument on the parameter "VIObject". The argument is null or empty. Provide an argument that is not null or empty, and then try
    the command again.
    E:\script\VM-DS-cluster.ps1:8 tank: 24
    + $cluster = get-view < < < < $esx. Parent - the name of the property
    + CategoryInfo: InvalidData: (:)) [Get-view], ParameterBindingValidationException)
    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView

    Get-view: could not validate the argument on the parameter "VIObject". The argument is null or empty. Provide an argument that is not null or empty, and then try
    the command again.
    E:\script\VM-DS-cluster.ps1:9 tank: 24
    + += get-view $report < < < < $vm. Store data-name of the property, summary |
    + CategoryInfo: InvalidData: (:)) [Get-view], ParameterBindingValidationException)
    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView

    It seems that your copy/paste lost some.

    I have attached the script

  • existing file of data created with the data file name

    Hi Experts

    We accidentally created a data file with the same name in the same place
    TABLESPACE_NAME           FILE_NAME                                                  FILE_ID STATUS    ONLINE_ size in MB AUT maxbytes in MB
    ------------------------- ------------------------------------------------------- ---------- --------- ------- ---------- --- --------------
    WP_DATA                   /NEXWPLPR/dbase/wpdata/wp_data01.dbf                             8 AVAILABLE ONLINE  32767.9844 YES     32767.9844
    WP_DATA                   /NEXWPLPR/dbase/wpdata/wp_data02.dbf                            12 AVAILABLE RECOVER
    WP_DATA                   /NEXWPLPR/dbase/wpdata/wp_data02.dbf                            11 AVAILABLE ONLINE        1000 NO               0
    on OS lavel
    -rw-r-----  1 oracle dba  1048584192 Oct 21 12:44 wp_data02.dbf
    -rw-r-----  1 oracle dba  1048584192 Oct 21 13:09 wp_data02.dbf
    -rw-r-----  1 oracle dba 34359730176 Oct 21 13:10 wp_data01.dbf
    Please suggest how we can solve the problem?

    Database: 10g
    OS: linux

    Concerning
    Rahul
    Rahul

    Published by: 825075 on October 21, 2011 05:25

    One of them is 2 characters at least other two. You have twice ascii code 32, it's space.
    What happens if you run now:

    select file_id,file_name from dba_data_files
    where file_name='/NEXWPLPR/dbase/wpdata/wp_data02.dbf  ';
    

    Notice the 2 spaces at the end.

    Nicolas.

  • Filtering the data in row based on the setting

    Hello
    I have a report with the following columns:
    No   Name    mgr_role1  mgr_role_value               dir_role2   dir_role_value       super_role3   super_role3_value   ......
    1    abc     Manager      1111                        Director     2222                Supervisor      4444   
    I want to pass a parameter  with LOV or enterable field     i.e Role: 
    If Role = 'Manager' I want to filter  dir_role2,dir_role_value,super_role3,super_role3_value   
    If Role = 'Director' I want to filter  dir_role1,dir_role_value1,super_role3,super_role3_value   
    If Role = 'Supervisor' I want to filter  dir_role1,dir_role_value1,super_role2,super_role2_value   
    We can create any parameters and filters the data like this in Discoverer?

    Thank you
    Kiran

    Hello

    You should probably create a condition for each column you are filtering on. Something like:

    dir_role1 = CASE WHEN: role IN ('supervisor', 'Director') THEN: dir_role ELSE dir_role1 END

    so that the column is filtered only when the role is supervisor or Director.

    Rod West

  • The Siebel data model with attribute mapping rule OPA?

    Hello

    Someone at - it has mapped siebel attribute of data model with the attribute rulefiles (rule of word doc file) (for example, p1, p2, p3... generated automatically)?

    I imported the siebel data model in OPM version 10.2. He created siebeldatmodel.xsrc file. all siebel attribute created with ID, model ID with the same name as the name attribute of siebel. but in the rulebook, we attributte with p1, p2, p3... names etc.

    The problem I am facing at I'm not able to map the attribute siebel generated with attribute (p1, p2, p3) rule book

    Any quick suggestions of experts will be very apperciable.


    Thank you

    There are a few simple rules for text attributes.

    1. unless the attribute belongs to the global level, the attribute must have the text of the entity included in its text. Thus, if the attribute belongs to the 'contact' it must understand that in its text. The possible options are:

    "* the contact work country."

    "the country of work of * the * contact."

    2. you cannot have two attributes with the same public name or the same text. So, you will get an error if you have two attributes with the same text "the country of work.

    Published by: frank.hampshire on July 27, 2011 13:50

    Published by: frank.hampshire on July 27, 2011 13:50

  • How to create the Webservice data control with a secure Web service?

    I am creating a data control with a Web service that requires authentication (SSO)
    There are two ports for my server OC4J 7777 (requires authentication) and 7779 (authentication is not required).
    (The service Web application is deployed in OC4J)

    I am able to create a data control with port 7779 not, but I'm not able to create with the port 7777. In my app, I'll go "user email" the SSO. I require it a data control with authentication. How to pass the user name and password when creating the data control? I'm not able to go "Point endpoint authentication" stage also. I get the error message "the WSDL document is not found" when I type the URL in the first step.

    I created the data control with port 7779 and after I modified the 'DataControls.dcx' file with port 7777. (IE "wsdl ="http://ipaddress:7777/../..?WSDL"), but I do not get the appropriate data.

    I work with JDeveloper 11.1.1.0.0g

    Please help me,

    Thanks in advance
    Vinod

    There was a few bugs in this area, who are already fixed in our current code line, then they should do it in the next version.

  • If I buy a person's computer and windows is registered in their name can I have register it in my name with the OEM for windows

    If I buy a person's computer and windows is registered in their name can I have register it in my name with the OEM for windows

    If I read your question correctly, this article should solve your problem for you:

    "How to change name and company information after you install Windows XP"
      <>http://support.Microsoft.com/kb/310441 >

    HTH,
    JW

  • At my place of work, there are a data server with LAN and internet networking. I want to disable the internet connection before it is infected with the virus.

    At my place of work, there are a data server with LAN and internet networking. I want to disable the internet connection before it is infected with the virus.

    original title: server and virus problem

    Hi SurajMendon,

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the platform of networking on TechNet. Please post your question in the TechNet Windows XP Networking forum.

    Networking platform

    http://social.technet.Microsoft.com/forums/en-us/winserverPN/threads

  • When you add pictures to the Vista image folder it creates a folder HIDDEN of the same name with two copies of the same image inside

    I use Vista 32 bit. I started to see this problem when I recently copy photos from an SD card.

    When you add pictures to the Vista image folder it creates a folder HIDDEN of the same name with two copies of the same image inside

    I saw hidden files enabled in folder options.

    Any help is appreciated.

    Hey guys... I found the answer... Problem is with the software vaio content analyzer that comes with the vaio...

    It just search for Vaio Content Analyzer (parameters) and deselect

    Video analysis
    image analysis
    analysis of the music

    I went looking for this crazy thing... used almost all types of online scan, and finally to find that it is caused by an internal software only...
    anyway thanks to all... Hope it helps someone in the future :)
  • Distribute the data file with the cod file?

    Hi all

    My application runs from a file of database on camera flash memory.  While the application can transfer data from my server to complete the database, the first download is quite large and takes a long time to run (I'm working on it).

    It occurred to me that an alternative might be to provide a database of pre-populated with the app file, while the app will run straight out of the box without needing to first synchronization.

    Does anyone know if the App World store supports this - distribution of data, and the app?

    Thank you very much...

    You're right about the wasted space.  How about you always include a resource file, but make sure that if your program needs to read data from "base", read from the resource file, and if it's new data, read from the DB.  I don't know what your app does so I don't know if it's feasible or not, but if this is the case, that would solve your problem.  What do you think?

  • Change all the names of Swatch "Name with color value"?

    Y at - it a Javascript command change the nuances in a document to the "Name with color value" box in the Swatch Options? I know there are scripts to change the names of swatch based on the value of the color, but I'm looking for a script that applies this specific to all checkbox.

    Thanks in advance!

    This should do it:

    (function(){
      var doc=app.activeDocument,
      sw=doc.swatches.everyItem().getElements(),
      c;
      for(var i=3; i 
    		   
  • Last part of longer texts are not checked spelling, why?

    I use FF as speller for long HTML files. It seems that after about 10 screen fulls the spelling checker works (I noticed tags HTML not marked after 10 pages or more).

  • Unknown user?

    I was looking at the thing of properties on my computer and the security, it was an unknown user. I have not recently deleted an account from my laptop, so I didn't know that an unknown user is possible. I have run scans and nothing came. I'm a littl

  • Nexus 7 k - int tunnel configuration failed

    I can not configure a tunnel on a Nexus 7 k interface tunnel of feature has been activated config: CLU # configure terminal Enter configuration commands, one per line. End with CNTL/Z. CLU (config) # tunnel feature CLU (config) # interface 0 tunnel c

  • Using drivers Inncorect SD card slot

    After a few tests, it seems that my T500 does not use the correct driver to access [b] [/ b] the data on the card. My SD card works in Linux (tested). Anyone know why I can't "fill" the volumes of the properties of the SD card reader device managemen