Need help with some cluster power shell scripts

Guys,

I need help with 2 scripts.

Text 1.

I need a power shell script that will get all the virtual machine in a specific cluster.  Virtual machine names as well as the number of processors, output allocated RAM and size of CSV file.

Text 2.

I need a script that will get all data warehouses in a specific cluster and store name data as well as the amounf of free space for a CSV output.

Thanks in advance guys.

Greetings, @peter79 -.

For the first part:

Get-Cluster myClusterName | Get-VM | Select-Object Name, MemoryMB, NumCpu | Export-Csv -NoTypeInformation c:\temp\myVMInfo.csv

And for the second, how about:

Get-Cluster myClusterName | Get-VMHost | Get-Random | Get-Datastore | Select-Object name, FreeSpaceMB, CapacityMB | Export-Csv -NoTypeInformation c:\temp\myDaterstoreInfo.csv

The first would be quite a bit faster by using Get - view instead of Get - VM.  It would be like:

## get an array of VM View objects with just the desired/needed properties
$arrVMViews = Get-View -ViewType VirtualMachine -SearchRoot (Get-Cluster myClusterName).MoRef -Property Config.Hardware,Name
## make the two filters for displaying the desired info
$hshCPUCountFilter = @{n="NumCPUs"; e={$_.Config.Hardware.NumCPU}}
$hshMemAmtFilter = @{n="MemoryMB"; e={$_.Config.Hardware.MemoryMB}}
## display the info, and export to CSV
$arrVMViews | Select-Object name, $hshCPUCountFilter, $hshMemAmtFilter | Export-Csv -NoTypeInformation c:\temp\myVMInfo.csv

Enjoy.

Tags: VMware

Similar Questions

  • Need help with charger and power adapter

    I can't find my charger for HP Elitebook 8570p.

    I need the specs for the power supply cable and adapter. If anyone can help. Be good if you have a photo too.

    Hello:

    You can find the necessary information in Chapter 3, pages 51 and 52 of the repair... Articles and part numbers.

    Power cords are classified separately according to the countries.

    http://h20628.www2.HP.com/km-ext/kmcsdirect/emr_na-c03565466-1.PDF

    The 90 Watt adapters are larger that the 65W those, the latter are more suited to travel with.

    If you want the 65 W adapter, then you want this one...

    AC adapter smart HP 65 W (RC/V, EM, 3-wire) HP Part # 693710-001

  • novice needs help with some questions

    I was myself ball how to design a website that is now almost complete, I need help, ensuring that everything is in order.
    My question is;
    at present, all the img sources are in a file in my computer IE... My Documents\My webs\site\image.jpg
    Now is this good? When I send this through the server it will be placed in another file and then the source will be incorrect?
    Matter that has any help, I know I'm a little sore but I'm just learning!

    If the path you have for your img tags has my documents... then Yes, it will be incorrect when you move the images on your web server. I'll put just generally in the way, I use on the server and worry about the pictures once I get the downloaded pages.

  • I need help with some Applescript for Postbox

    I was wondering if any of you can help me?

    I am writing a very simple script for my Postbox email application. It takes the selected message and turns it into a reminder. Everything works fine, but I want to take the subject assigned to the message and use it as the name of the callback list, and that's where it breaks down (topics are tags, as in Thunderbird and Mail).

    According to the dictionary, a message object counts among its subjects msg properties which is a list of subjects. According to the dictionary, a subject has three properties so, id, name , and color.

    I need only the first topic, so I do something like

    set theTopics to msg topics of theMessage.
    set theTopic to item 1 of theTopics

    no error reported, it returns a list, but when I then try to access the properties of the first article (= first subject), it is clear that something is wrong, and I think it's a bug/bad programming in the mailbox, but I'm not sure.

    When I do something like

    set ReminderList to name of theTopic

    He begins to complain. It is said that name (or id or color) is not available, as I can't get this to other classes, and it does not even return the class type for the element.

    It will return something that looks like this:

    class {show id "some topic"}

    no name for the class.

    And it seems that the text, but it behaves differently.

    How can I know what I'm actually deal with this object "topic"?

    What is - this actually to return?

    I don't know the app, but try to go back to theTopic properties.  That could make things a little clearer.

  • Need help with some oracle basics

    Hi friends,

    I would like to know if my abt to understand some concepts as described below is just?

    1) active user : when a user issues a command SQL to oracle to perform.

    (2) * user inactive: * when oracle wait for users to issue commands and the user is INACTIVE.


    Please help me to find these answers:

    A user become active when they click submit button/backup/restore?

    I would like to know how much resources a user oracle uses (network traffic, memory, I / O)?

    Is a user uses some resources if it is inactive and sitting idle for long time?



    Thank you

    Oracle marks a session as a session inactive if the user will not do anything with the database for some time. I don't know what is the explanation for the status of the session that you see a toad, since I do not use it. Maybe someone else would have a better explanation then wait for others to participate.

    Aman...

  • Need help with some files

    Then I opened the Task Manager today only to find 3 things I'd never seen before, they were atieclxx.exe, csrss.exe and winlong.exe. I did a bit of googoling (?) and I'm a bit confused. I see a few similar questions on other forums were people said that they were a form of spyware, while others apparently say it is just a process about my graphics card and normal to run, but I had never seen before.

    I would be grateful if someone could give me some clarification.

    Thank you.

    For peace of mind I suggest you run a malware check

    I recommend that you run Disk Cleanup or cCleaner to remove temporary files as this will reduce the time to scan security software.

    Start the computer in safe mode with network and download and install Malwarebytes (free version for individuals only), updated definitions and run in normal mode. Disable other security software while you do the analyses.
    http://www.computerhope.com/issues/chsafe.htm

    http://www.Malwarebytes.org/products/malwarebytes_free
    http://helpdesk.Malwarebytes.org/entries/21892442-should-I-scan-with-Malwarebytes-anti-malware-in-safe-mode-

    Download and run SuperAntiSpyware (Free Edition)
    http://www.SUPERAntiSpyware.com/download.html

  • I need help with some files missing error Muse - crazy customer

    I get the error that some files are missing or incorrect. I have cleared the cache, I downloaded all the two to Muse, FTP etc. I cleaned the server and reloaded. Make the same mistake everywhere and can not find out what is happening.  www.Authorizedagents.com is the Web site. Site is horrible, but looks great in the preview. I'm in trouble

    Thank you

    Call your hosting provider. The hosting server is back a '503 Service temporarily unavailable' error rather than serve properly good number of files of your site.

  • Need help with my Y40-80? power management

    I get message to the center of the Action as follows:

    Compatibility problem between your power management system and Windows

    Your power management system is not compatible with this version of Windows.

    The name of the model of your power management system is ACPI Lenovo compatible virtual controller.

    Can anyone help please. I have windows running Y40-80 8.1 is a clean install of windows 8.1 x 64 all drivers are up to this day, just need help with the question above thank you

    Lenovo today released a new bios update for Y40-80 laptops, I did the update and, so far, the error message that I posted above has not appeared again so set the mite of update of the bios not sure yet, I'll keep up to date on this subject and write again soon

  • Need help with a script (o - o8) *, see the Virgin if there is no

    Hi all what I need help with a script I can't find an example.

    I'm trying to subtract 2 numbers and then multiply this product. (o o8) * one but I just want to do the calculations if all fields have the numbers IE field o, o8 of field and field one.

    Thank you in advance. I was stuck on this days searching the Internet.

    Assuming you want to affect the outcome of this calculation in another text field, use this code as a custom field calculation script:

    var o = this.getField("o").valueAsString;
    var o8 = this.getField("o8").valueAsString;
    var a = this.getField("a").valueAsString;
    if (o!="" && o8!="" && a!="") event.value = (Number(o)-Number(o8))*Number(a);
    else event.value = "";
    
  • Need help with network home using Airport extreme

    I need help with my home network.  I'm not very aware when it comes to all things network.  Here's how my network is currently set up.

    Cable modem to Airport Extreme for Gigabit Switch.  Cables come out of the switch to all areas of the House.  I have 2 other extreme airport connected in other rooms of the House directly on the wall that dates back to the switch.  I hope I am explaining that properly.

    My problem is that this seems to have caused some of my connections cable does not work.  When everything is configured, it has worked well.  All connections in the House worked.  Then we have disconnected one of the extreme airport and moved to another location in the House to have the best wifi coverage.  Since that time, a lot of the ethernet wall plugs are not working.  For example, when I plug in my Macbook Pro in making ethernet in my kitchen, it says connected but it has an assigned ip address and cannot connect to the internet.

    Any help you can provide would be great.

    I would like to get the return tech to help you to...

    But it is likely that something (or someone) has tampered with the settings.

    The layout is fine... but you can cause problems with the network by creating a loop.

    This can happen because the AE you moved is connected wrongly... somewhere in the network it is connected to the switch again.

    Or AE is set to expand wireless... It's FAKE... It will loop the network on the back main EI wireless.

    Unplug the two AE you have that function as extensions...

    Turning off everything else... then it works again...

    Do it in this order.

    Modem... Wait 2 min

    AE... Wait 2 min

    Switch.

    Now check that the network is working properly... power of customers in various locations and make sure everything is good.

    If so, then manually reset the two AE of factory and redo their installation.

  • Need help with screen Blus of death (BSOD) on my computer toshiba laptop

    Hello all, Ive had a little last week, or problems with my laptop. While playing a game (minecraft), I would randomly have a BSOD error and my laptop will re-start. Initially, I gave it no thought, but when it happened again, I decided to try to do a little research, but I'm not terrible with technology and other then I'm neither the case with my own research.

    If someone could point me in the direction of a few possible ways to get this problem.

    guys do you propose I make to the store and see if they can check it out, what would I need if I did.

    I got a program to read some sort of file "dump" made when occurs a BSOD, I publish what this program here says? the program is BlueScreenView, if yes, what I have post the spectator thing? There are has 2 main screens on it, SDO as Sho different dump files (which is on the top) and on the bottom, it lists the names of different files for each dump file I think that some of them highlighted.

    im not this product with tech so I don't know much but I need to post anything on my laptop or any information of the dumpfile and would have this info help in any way to determine the problem? just tell me what I have to post and ill get the information displayed in a response, thank you.

    -leoknighted

    PS: I don't think that playing minecraft is the cause of the BSOD and crashing, but I only get it when playing minecraft, so I don't know if minecraft is causing accidents and others. I watch videos and this all the time and I never have an accident. I'll try and play a different game and see if this causes my laptop down and the cause is perhaps high usuage to my laptop, as I've said games require a lot of power of a laptop/computer, if they are not the 'best' laptop for games. but yh, if someone thinks they can help me and need some information please tell me so I can get it for you. If you guys think it would be best to get a professional to look just mylaptop say, however im save as a last resort.

    Hello

    I suggest you to refer to this article to check if this help.

     

    Resolve stop (blue screen) error in Windows 7
    http://Windows.Microsoft.com/en-us/Windows7/resolving-stop-blue-screen-errors-in-Windows-7

    Important: System Restore will return all system files not as documents, email, music, etc., to a previous state. These files of types are completely affected by the restoration of the system. If it was your intention with this tool to recover a deleted file to non-system, try using a file instead of system restore recovery program.

     

    Important: while performing the check disk on the hard disk, if bad sectors can be found, then check disk will try to repair this sector. All the data available in this area may be lost.

     

    Custom installation WARNING: If you format the hard disk during the installation, the data files are saved in a Windows.old folder on the partition you installed Windows 7.  However, you should always back up the files. If you have encrypted data files, you may not be able to access them after installing Windows 7. If you have backed up your data files and then restored after Windows 7 is installed, you can delete the Windows.old folder.

    Let us know if you need help with this question, we will be happy to offer you our help.

  • Need help with sizing and save files in batches

    Hi need help with a project.

    I have thousands of vector files that I need size of 350px X 350px, and then place it on a work plan x 600px-600px.

    Then I need to save it to the web as a PNG with a transparent background.

    Could I do a script for? or is there another way to do it in batches?

    I wouldn't have to open them one by one and resize the work plan then the image and save it one by one as that would take forever.

    Any help some suggestions would be greatly appreciated.

    ID do as a series of actions photoshop if the end result is png,

    pro image processor can help you make automatically, if you must resize batch additional... >

    https://sourceforge.NET/projects/PS-scripts/files/image%20Processor%20PRO/v3_2%20betas/

    I think that your work can run in a few steps, but for simplicity, I would like to start / test with a new photoshop action recording

    Open a file, change the size of the image to 350 x 350

    Change the canvas size,

    then save under...

  • Need help with the data storage store, local array and network connections

    Need help with my ESXi 4.1 installation

    My hardware:

    I built a server with an Asus P6T whitebox, i7 920, 12 Gig RAM, NIC, Intel Pro1000 PT Quad, 3ware 9650SE-12ML with 8 1.5 TB SATA green in a raid 6 array gives me about 8 + TB with a spare drive all housed within a NORCO RPC-4220 4U Rackmount Server chassis.  I also have a 500 GB SATA drive which will hold the ESXi and virtual machines.

    The network includes a firewall, Netgear Prosafe FVS336G, GS724Tv of Netgear ProSafe 24 port Gigabit Managed Switch on a dhcp cable modem internet service provider.

    I also have 2 old NetGear SC101T NAS disks (4to) I want to connect to the system how some - at a later date have... data on them and want to transfer to the new storage array. I always looking into the question of whether they will work with ESXi 4.1, or I might have to only access it through Windows XP.

    My Situation:

    I have already installed ESXi 4.1 and vsphere client with no problems and it is connected to a dhcp cable internet service.  I've set up host via a dynamic DNS service name give me a static hostname on the internet.  I installed three machines to virtual OS successfully at the moment and now want to first start by creating a multimedia storage server which will use some of this new 8 TB array, then separate data storage for use with a web server small overhead storage and a backup.  It is a domestic installation.

    Help with the data store and network:

    I was doing some reading, because I'm new to this, and it looks like I'll probably want to set up my table via ESXi as a nfs disk format.  Now, the data store is usually in another physical box from what I understand, but I put my readers and ESXi all in the same box.  I'm not sure that the best way to put in place with grouped network cards, but I want to make this work.

    I understand that in ESXi 4.1 using iSCSi LUN must be less than 2 TB, but nfs - I should be able to add a bigger partition then 2 TB (for my multimedia) in nfs, right? or should I still add it separately as a separate 2 TB drives and then extend them to get the biggest space.

    Any suggestions or direct resources showing examples on how to actually add some parts of the table as data warehouses separate nfs.  I know that to go to the configuration tab, and then select Add to storage, and then select nfs. I have not my picture, but it's here that I don't know what to do because ESXi 4.1 system already has an address, should I put the same thing to the new data store array also (will it work?), and what should I use for the name of the folder and the store of data... just do something to the top.  I thought to later install Openfiler (for a multimedia storage using this table server) as a virtual machine, use the table with esxi so that I can access the same storage space with widows and linux-based systems.

    I also know I have to find a way to better use my quad nic card... put in place of virtual switches, grouping, etc HELP?

    Any direction, assistance, similar facilities to sample, suggestions or resources that would help would be great. I did a lot of hunting, but still a little confused on how to best to put in place.

    You must think of VMDK files of large databases with records of random size guest go read some data (a DLL or an INI file), maybe write some data back, then go read other data. Some files are tiny, but certain DLLs are several megabytes. It's random i/o all and heavy on the search time. IO Opsys is small random operations that are often sequential (go read data, write data, go read other data,...) so that deadlines are critical to the overall performance. That's why people say OPS are / s of reference and forget the MBs flow. The only time where you bulk transfers are when you read media (ISO files).

    Well, now forget all this. Actually the disk activity will depend on the specific applications (database? mail server? machines compiler?), but the above is true for boots, and whenever applications are idle. You should see the profile to know.

    RAID 10 is faster (and often more reliable) than RAID 5 or RAID-6 except in certain specific cases. In General RAID 10 is ideal for many random writes, since the calculation of parity for RAID-5 and - 6 adds to the overall latency between command and response - latency is cumulative if a little slow here and a little slow it adds up to a lot of overall slow synchronous especially with e/s on a network. OTOH RAID-5 and -6 can produce faster readings due to the number of heads, so you can use it for virtual machines that transfer bulk. Test. You may find that you need several different types subdashboards for best results.

    You said 3ware, they have some good grades on their site, but don't believe it. With my 9650 that I found myself with only a couple of their recommendations-, I put the (simple) table for allocation size 256 k, nr_requests at 2 x the queue_depth and use the planner date limit. I had the habit for the Ext4 file system formatted with stride and stripe-width synced to the table and used the options large_files with fewer inodes (do not use the huge_files option unless you plan to have single VMDK files in the terabyte range). Use a cache of great reading in advance.

    Virtual machines use VMDK files in all cases except raw iSCSI LUN that they treat native disks. VMDK is easier to manage - you can make a backup by copying the file, you can move it to a PC and load it into another flavour of VMware, etc. There could be some features iSCSI to your San as a transparent migration but nothing for me. NFS has less chatter of Protocol if latency lower times to complete an operation. NFS is good to read and write a block of data, that's all it boils down to.

    UPS is good, but it won't help if something inside the machine explodes (UPS does nothing if the PC power supply goes down). If the RAID card has an option for a battery backup module, so it can contain some writings in memory and may end up the disk i/o after replacing the power supply. 3ware also limits the types of caching available if help is not installed, and you get just the right numbers with the module.

  • NEED HELP WITH SERVICE PACK 3. After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. ,

    NEED HELP WITH SERVICE PACK 3.  After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. , but it of although he gets, he keeps countdown to restart and reboots and restarts, over and over again, never reboots, same screen. my computer won't let me out this screen even after I turned off the computer and turn it back on, I get the same screen. the only way I can get out of this is to erase my computer everything and bring it back to factory, right out of the box, this big headaches. Thanks for anyone who can help me. PS. Keep the answers in simple terms please.

    Hi BSRC$, in stock

    1. You have security software installed on the computer?
    2. You receive an error message when you restart the computer?

    Reinstalling Windows XP to the factory setting would not be the first option.

    It is possible that some third-party programs or the services installed on the computer interfere with the installation of service pack 3.

    I suggest that you try to uninstall service pack 3 from the computer by using the recovery console and subsequently ask the article below for what to do before installing the service pack 3on the computer.

    How to remove Windows XP Service Pack 3 from your computer

    http://support.Microsoft.com/kb/950249

    Steps to take before you install Windows XP Service Pack 3

    http://support.Microsoft.com/kb/950717

  • Need help with windows defender. all my files folders pictures everythiing disappeared and I find myself with this black screen and it is not all good: o)

    Need help with windows defender. all my files folders pictures everythiing disappeared and I find myself with this black screen and it is not all good: o)

    I don't know why vista windows no longer charge, or when the files and folders disappeared

    How Windows Defender is on this problem?

    Follow these steps to try to solve your problems of boot.

     

     

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner:http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Data recovery:

    1. slave of your hard drive in another computer and read/save your data out there.

    2. put your Hard drive in a USB hard drive case, plug it into another computer and read/save from there.

    3 Alternatively, use Knoppix Live CD to recover data:

    http://www.Knopper.NET/Knoppix/index-en.html

    Download/save the file Knoppix Live CD ISO above.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://isorecorder.alexfeinman.com/isorecorder.htm

    Download the Vista software from the link above.

    After installing above ISO burning software, right click on the Knoppix ISO file > copy the Image to a CD.

    Knoppix is not installed on your PC; use only the resources of your PC, RAM, graphics etc.

    Change the boot order in YOUR computer/laptop to the CD/DVD Drive 1st in the boot order.

    Plug a Flash Drive/Memory Stick, BOOT with the Live CD, and you should be able to read the hard drive.

    When the desktop loads, you will see at least two drive hard icons on the desktop (one for your hard drive) and one for the USB key.

    Click on the icons of hard drive to open and to understand which drive is which.

    Click the icon for the USB drive and click on "Actions > Change the read/write mode" so you can write to disk (it is read-only by default for security reasons).

    Now to find the files you want to back up, just drag and drop them on the USB. When you're done, shut down the system and remove the USB key.

    See you soon.

    Mick Murphy - Microsoft partner

Maybe you are looking for