simple script for the list of all data warehouses properties

I searched a lot of scripts to get information about my data stores. I can quickly export most the properies of that I need right to a csv file vCenter. A flagrant lack room is the 'space Proviosoned' display of list of data store. I look at the properties of each data store to see this information. Y at - it a script that can get this information?  For this script, I don't reallt care about the news at the virtual machine level.

Until they solve this problem, you can use something like this

Get-Datastore | where {$_.Type -eq "VMFS"} | Select Name,
       @{N="Status";E={$_.Extensiondata.OverallStatus}},
       @{N="Device";E={$_.Extensiondata.Info.Vmfs.Extent[0].DiskName}},
       @{N="Capacity";E={"{0:f2} GB"-f ($_.CapacityMB /1KB)}},
       @{N="Free";E={"{0:f2} GB"-f ($_.FreeSpaceMB /1KB)}},
       @{N="Provisioned";E={"{0:f2} GB"-f (($_.ExtensionData.Summary.Capacity - $_.ExtensionData.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted) /1GB)}},
       @{N="Type";E={$_.Extensiondata.Info.Vmfs.Type.ToLower() + $_.Extensiondata.Info.Vmfs.MajorVersion}},
       @{N="Last Update";E={$_.Extensiondata.Info.Timestamp}}

Tags: VMware

Similar Questions

  • I'm looking for a script for a list of all IIS servers in a domain?

    I'm looking for a script VB list all IIS servers (IIS5 and 6) in a field?  If possible, the output contains the version of the IIS server.

    Thank you!

    Try asking in the IIS forums...
    http://forums.IIS.NET/

  • The list of all dates, the 15-minute step

    Hi all
    I need to list all the dates of a given interval using a not fixed for 15 minutes.

    A very crude solution could be:
      SELECT *
        FROM (SELECT TO_DATE ('20110218', 'YYYYMMDD') + 15 * (ROWNUM - 1) / (24 * 60) MYDATE
                FROM (  SELECT 1 JUST_A_COLUMN
                          FROM DUAL
                      GROUP BY CUBE (1, 2, 3, 4, 5, 6, 7, 8, 9)))
       WHERE MYDATE BETWEEN TO_DATE ('20110218221500', 'YYYYMMDDHH24MISS') AND TO_DATE ('20110219013000', 'YYYYMMDDHH24MISS')
    ORDER BY 1 ASC;
    
    18/02/2011 22.15.00
    18/02/2011 22.30.00
    18/02/2011 22.45.00
    18/02/2011 23.00.00
    18/02/2011 23.15.00
    18/02/2011 23.30.00
    18/02/2011 23.45.00
    19/02/2011
    19/02/2011 0.15.00
    19/02/2011 0.30.00
    19/02/2011 0.45.00
    19/02/2011 1.00.00
    19/02/2011 1.15.00
    19/02/2011 1.30.00
    but I need something more general (and maybe faster...).

    Does anyone have a solution for my problem?

    Thank you
    Riccardo
    SELECT     to_char(to_date('17/02/2011','dd/mm/yyyy') + LEVEL/(24*4),'dd/mm/yyyy hh:mi:ss am') AS a_date
    FROM     dual
    CONNECT BY     LEVEL     <= (to_date('18/02/2011','dd/mm/yyyy') - to_date('17/02/2011','dd/mm/yyyy'))*24*4
    
  • Script for the use of XML data to pre file form open using the player

    I need to pre fill five fields when the user opens the form using Acrobat Reader (title, name, address, etc.). The values are saved in an xml data file in the same directory as the form (no database or web services connections). I tested the xml code and form structures using shapes-> manage form data-> import data and everything works fine. Now, I need to emulate this behavior programmatically, so it does not work using only Acrobat Reader. I can't find the magic java script command to import the data (I tried xfa.host.importData and xfa.datasets.data.loadXML without result). Require purchase Pro or Livecycle Server product is not an option. This seems to be a basic requirement, so I hope I'm just being stupid and missing of which is obvious. Thank you.

    Hello

    Unless you're reader allowing the form with LiveCycle Reader Extensions ES, users with reader will NOT be able to import (or export) XML.

    Summary here: https://acrobat.com/#d=3lGJZAZuOmk8h86HCWyJKg

    Based on your description that you look at options 2 and 3, users with the reader.

    Sorry,

    Niall

  • Need a script to the list of all the virtual machines in CSV

    I want to record a list of virtual machines from one host in a csv file so that I can add to their return with

    New-VM - VMFilePath $VMXFile - $vmhost $ESXHost - $VMFolder location

    I started with that, but am struggling with the name of the folder of the virtual machine (can be used in New-VM-map)

    Get-VIServer-Server MyServer - protocol https-Force | out-null

    $report = @)

    Get - VM | Get-View | %{

    $row = "" | Select Name, VmPathName, location

    $row. Name = $_. Name

    $row. VmPathName = $_. Config.Files.VmPathName

    # $row. Location = $_. Folder # faced with this line

    $report += $row

    }

    $report

    # How to make this online, don't invite not not the user?

    Disconnect-VIServer-Server MyServer - Force

    Try this, it should give the blue files

    New-VIProperty -Name 'BlueFolderPath' -ObjectType 'VirtualMachine' -Value {    param($vm)
    
        function Get-ParentName {        param($object)
    
            if($object.Folder) {            $blue = Get-ParentName $object.Folder            $name = $object.Folder.Name        }        elseif($object.Parent -and $object.Parent.GetType().Name -like "Folder*") {            $blue = Get-ParentName $object.Parent            $name = $object.Parent.Name        }        elseif($object.ParentFolder){            $blue = Get-ParentName $object.ParentFolder            $name = $object.ParentFolder.Name        }        if("vm","Datacenters" -notcontains $name) {            $blue + "/" + $name        }        else{            $blue        }    }
    
        (Get-ParentName $vm).Remove(0,1)} -Force | Out-Null
    
    Connect-VIServer -Server MyServer -Protocol https -Force | out-null
    
    $report = @()Get-VM  | %{  $row = "" | select Name, VmPathName, Location  $row.Name = $_.Name  $row.VmPathName = $_.ExtensionData.Config.Files.VmPathName  $row.Location = $_.BlueFolderPath  $report += $row}$report
    
    Disconnect-VIServer -Server MyServer -Confirm:$false
    
  • Need a script to the list name VM, the guest operating system, data store...

    I need to move a large number of virtual machines with MS Server 2008 to another storage.
    Could someone provide me with a small script for the list: all VM with GuestOS Type (MS Server 2008 filtered), name of store data and the overall computer virtual size!

    Thanks in advance

    Hello, farkasharry-

    How about something like:

    Get-View -ViewType VirtualMachine -Property Name,Config.GuestFullName,Storage.PerDatastoreUsage,Summary.Storage -Filter @{"Config.GuestFullName" = "Windows.*2008.*"} | %{    ## get the name(s) of the datastores on which this VM resides    $strDatastoreNames = ($_.Storage.PerDatastoreUsage | %{Get-View -Id $_.Datastore -Property Name} | %{$_.Name}) -join ","    New-Object -TypeName PSObject -Property @{        Name = $_.Name        GuestOS = $_.Config.GuestFullName        "Datastore(s)" = $strDatastoreNames        ## the amount of storage that the VM is using        UsedGB = [Math]::Round($_.Summary.Storage.Committed / 1GB, 1)        ## the total amount of storage that the VM _could_ use        ProvisionedGB = [Math]::Round(($_.Summary.Storage.Committed + $_.Summary.Storage.Unommitted) / 1GB, 1)    } ## end new-object} | Select Name, GuestOS, "Datastore(s)", UsedGB, ProvisionedGB
    

    It filters on the virtual machines with an OS name ("GuestFullName"), which corresponds to 'Windows.*2008. ' * ' and returns their name, the GuestFullName, the data store (s) on which they reside (maybe more), and the opportunity - and put into service in GB disk space.

    Return items are objects, so that you can select export to formats the info as you please, using the, say, Format-Table, Select-Object, Export-Csv, etc.

    And, because it uses the cmdlet Get-View, it should work pretty quickly.

    How does do for you?

  • I would like to get the list of all devices on which my creative cloud has been activated for the last six months or a year

    I would like to get the list of all devices on which my creative cloud has been activated for the last six months or a year

    I do not think that information... Adobe titles represent the only link I know following your accounts, but not where the programs are installed

    https://Accounts.adobe.com/ , then click on Plans & products above to find a list of your programs and your serial numbers

  • Progams in x 86 folder do not appear in the Listing of all programs

    I just upgraded to Vista 64 bit Ultimate for Windows 7 64 bit Ultimate and good number of my x 86 programs do not appear in the list of programs all in fact you can even find them using the search command, but they are clearly there in the X 86 folder. I know that I can create a shortcut on my desktop or pin them to the start menu, but there are literally dozens of programs in there that I use semi systematically in the X 86 folder that I don't want on my desk or pinned to the start menu. Often when I try and call a program of a doucument windows comes up with the association of file menu, but the program (X 86) is not displayed. Is this a bug with my system or a known problem such as Google Earth users know ovet the past year where as a result of an upgrade of the Windows program removes program form the list of all programs and removes the desktop icon?

    Hello Scourtercraig,

    A similar thread has responded here. I also found a third party article in which to some people have found a solution: Windows 7 - 86 program files not showing in the Start Menu. I hope it helps.

    Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Start the list of all menu Programs - folder accidentally moved to the desktop

    I just got a new computer with Windows 7.  I accidentally dragged a folder in the "all programs" list in the start menu on the desktop.  I just wanted to create a shortcut, but accidentally moved the folder instead.  How do I restore the folder to the list of "all programs"?

    Hello

    That is not a problem and it is easy to retrieve.  You are going to want to go where the files and folders are stored in your Start menu and the best way to do this is to open your Start menu, go to all programs and on another folder with the right mouse button and choose explore.  This will put you in the location wherever the folders and shortcuts are stored.  From there, just move up a level and move the backrest to the workstation and you should be good.

    For more information, there are 2 folders that make up what you see in the menu start, a common (or public) and a private.  Both get merged to give a smooth.

    The common (public), one is to C:\ProgramData\Microsoft\Windows\Start start\program

    and the private sector, one is C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

    Files above are below hidden folders so you will need to first enable the option to view hidden folders and files, but the right click Explore method is the best way to get there anyway.

    Finally, if you want to create a shortcut to a folder on the start menu, find it and then right click and choose "send to".  Under this menu, you will see an option to create a shortcut on the desktop.

    I hope this helps.

    Good luck & enjoy Windows 7
    Jon

    http://www.insidetheregistry.com

    PS - For future notes, if you make mistakes like that, just press CTRL + Z and it should undo what you did everything in the majority of cases.
    If this message was useful and allowed, please consider the vote and it offers as a response...

  • Arrange program shortcuts in the list of all programs on the start menu

    If I organize my program shortcuts on the list of all programs from the menu start when I reboot they are all changed back.

    As in, I move the "CyberLink PowerDVD 9" folder in the "Media" folder when I restart a new

    Folder "CyberLink PowerDVD 9" is placed on the list of all programs on the start menu.

    Now I have two folders "CyberLink PowerDVD 9" in all the programs one at the root of the list and the other in the folder 'Media' from the list.

    How to stop windows 7 to change the list of all programs on the start menu?

    Is it only occurs for the shortcut of CyberLink, or perhaps for each shortcut where you changed a location?

    You can check this: Start > right click on all programs > you can select Open and open to all users > you can check is not listed in the two location?

    Shortcuts usually appear at the previous location after a few updates to the specified application.

  • Script for the Configuration DVSwitch

    Hello

    Someone at - it a script for the information of VDS on the level of the host which nic is connected to what uplink?

    Also to remove all Exchange created in the VDS switch for the host and then recreate the exchanges as they were after the connection to the host to a vCenter diff?

    Also any script to copy the resource through VCenter pools?

    Thank you

    Suraj Rawat

    The following script will export information of VDS for uplink, the port they are in and what Teddy is used by node ESXi.

    $report = {foreach ($dvSw in Get-VDSwitch)

    foreach ($esx in (Get-View-id $dvSw.ExtensionData.Summary.HostMember)) {}

    $proxy = $esx.Config.Network.ProxySwitch | where {$_.} {DvsUuid - eq $dvSw.ExtensionData.Uuid}

    $pnicTab = @ {}

    $proxy. Spec.Backing.PnicSpec | %{

    $pnicTab.Add ($_.) UplinkPortKey, $_. PnicDevice)

    }

    $proxy. UplinkPort |

    Select @{N = "vdSwitch"; {E = {$dvSw.Name}}.

    @{N = "$vmhost"; E = {$esx. Name}},

    @{N = "vNIC"; E = {$pnicTab [$_]} Key]}},

    @{N = "Uplink"; E={$_. Value}},

    @{N = 'Port'; E={$_. Key}}

    }

    }

    $report | Export Csv C:\dvSw-Uplink.csv - NoTypeInformation - UseCulture

  • Where is the list of all the questions I ask myself?

    Hello

    I did not use the community forums for a long time and I've noticed that things have changed and so I looked around to familiarize myself with the things again.

    However, I find is no longer the list of questions I have asked over the years and would love to be able to access them again if possible.

    Does anyone know that that they have been removed? Or if there is a way I can find my questions?

    Really appreciate your time and your help.

    Thank you!

    Click on your post: where is the list of all the questions I ask myself?

    Click on your name in blue at the top of your message

    Click on content in your profile under your photo and a little left.

    You should see a list of your messages.

  • The list of all the virtual machines of an organization

    Hi all

    I use .net api for vcloud. I need the list of all virtual machines of an organization. How I do that?

    Kamal

    Hello

    A paralytic can contain several virtual machines. Once, you get the use of vApp, the GetChildrenVms() for the confined list of the VM.

    VAPP vapp = Vapp.GetVappByReference (customer, vAppRef);

    foreach (VAPP vm in VAPP. {GetChildrenVms()})

    Console.WriteLine ("" + vm.) Reference.Name);

    Console.WriteLine ("" + vm.) Reference.href);

    }

    Creating a paralyzed man from a vAppTemplate will contain the same number of VM contained in a vAppTempalte.

    If the vAppTemplate contains 3 VM inside. VApp created using the vAppTempalte would also contain the same 3 VM.

    Ex: If the Ex vAppTempalte: WebApplication-vAppTemplate contains a DatabaseVM and AppServerVM.

    VApp created from the Ex vAppTemplate: WebApplication-VAPP will also contain a DatabaseVM and AppServerVM.

    Kind regards

    Rajesh Kamal.

  • How should be written the script for the use of the maximum memory of the guest operating system ever?

    How should be written the script for the use of the maximum memory of the guest operating system ever?

    Please teach the name of the object and the type and order, etc.

    You should be able to do it with the cmdlet Get-Stat .

    Something like that

    Get-Stat -Entity (Get-VM $vmName) -Stat mem.usage.maximum -Start (Get-Date).AddDays(-7) | Measure-Object -Property value -Maximum | Select Maximum
    

    This will return the maximum percentage in the last 7 days for the guests, whose name is stored in the variable $vmName.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Script for the conversion of the hyperlinks to the buttons?

    Hello!

    Does anyone know if West a script for the conversion of the hyperlinks to buttons with the action of going to the URL with the same URL, which has been used with hyperlink?

    Here it is:

    /* Copyright 2012, Kasyan Servetsky
    November 29, 2012
    Written by Kasyan Servetsky
    http://www.kasyan.ho.com.ua
    e-mail: [email protected] */
    //======================================================================================
    var scriptName = "Convert hyperlinks to buttons - 1.0";
    
    Main();
    
    //===================================== FUNCTIONS  ======================================
    function Main() {
        var hyperlink, source, sourceText, destination, page, arr, outlinedText, gb, button, behavior,
        barodeCount = 0,
        hypCount = 0;
        if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
        var startTime = new Date();
    
        var doc = app.activeDocument;
        var layer = doc.layers.item("Buttons");
        var swatch = doc.swatches.item("RGB Yellow");
        var hyperlinks = doc.hyperlinks;
    
        var progressWin = new Window ("window", scriptName);
        progressBar = progressWin.add ("progressbar", undefined, 0, undefined);
        progressBar.preferredSize.width = 450;
        progressTxt = progressWin.add("statictext", undefined,  "Starting processing hyperlinks");
        progressTxt.preferredSize.width = 400;
        progressTxt.preferredSize.height = 30;
        progressTxt.alignment = "left";
        progressBar.maxvalue = hyperlinks.length;
        progressWin.show();
    
        for (var i = hyperlinks.length-1; i >= 0; i--) {
            hyperlink = hyperlinks[i];
            source = hyperlink.source;
            sourceText = source.sourceText;
            destination = hyperlink.destination;
            page = sourceText.parentTextFrames[0].parentPage;
    
            barodeCount++;
            progressBar.value = barodeCount;
            progressTxt.text = "Processing hyperlink " + hyperlink.name + " (Page - " + page.name + ")";
    
            arr = sourceText.createOutlines(false);
            outlinedText = arr[0];
            gb = outlinedText.geometricBounds;
            outlinedText.remove();
    
            button = page.buttons.add(layer, {geometricBounds: gb, name: hyperlink.name});
            button.fillColor = swatch;
            button.fillTint = 50;
            button.groups[0].transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
            behavior = button.gotoURLBehaviors.add();
            behavior.url = destination.destinationURL;
    
            hyperlink.remove();
            source.remove();
    
            hypCount++;
        }
    
        var endTime = new Date();
        var duration = GetDuration(startTime, endTime);
        progressWin.close();
    
        alert("Finished. " + hypCount + " hyperlinks were convertted to buttons.\n(time elapsed: " + duration + ")", scriptName);
    
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function GetDuration(startTime, endTime) {
        var str;
        var duration = (endTime - startTime)/1000;
        duration = Math.round(duration);
        if (duration >= 60) {
            var minutes = Math.floor(duration/60);
            var seconds = duration - (minutes * 60);
            str = minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            if (minutes >= 60) {
                var hours = Math.floor(minutes/60);
                minutes = minutes - (hours * 60);
                str = hours + ((hours != 1) ? " hours, " : " hour, ") + minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            }
        }
        else {
            str = duration + ((duration != 1) ? " seconds" : " second");
        }
    
        return str;
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function ErrorExit(error, icon) {
        alert(error, scriptName, icon);
        exit();
    }
    

Maybe you are looking for