Extend the existing under certain conditions drive and add if no disc

Here's what I'm trying to achieve.

  1. increase the disk space on a drive (drive C - D) especially if they are smaller than a standard value of the particular company
  2. detect if there is a 2nd drive or not and if not then add a 3rd disc

Optional:

(a) extend the drive increased inside the guest OS

(b) initialize, format the drive newly added inside the guest OS

Currently, this is what I came with

#if hard drive 1 is less than 60 increase the size of the HDD to 60 and then to exceed inside the guest OS or ignore this action

Get-disk hard - vm TestVM | where {$_.} Name - eq 'disk 1'} | If ((mesure-objet-propriété CapacityGB-somme) - lt 60) {}

Together-hard drive - CapacityGB 60 - ResizeGuestPartition-confirm: $false

}

on the other

{

Write-Host "no action is needed" - foregroundcolor Red

}

Now, I don't know how to add a 2nd 80 GB drive after checking if it has a 2nd drive or not.

My motto is, he must check if there is a 2nd drive or not and if there are move adding the drive and if there is no 2nd disc (disc 2) then add a HDD of 80 GB.

You could do something in this sense

$hd = get-disk hard - vm TestVM

if($HD.) Count - eq 1) {}

New-harddisk - CapacityGB 60 - VM TestVM

}

else {}

Write-Host "2nd current HD - no action is needed" - foregroundcolor Red

}

If ($hd [0].) {CapacityGB - 60 lt)

$hd [0] | Together-hard drive - CapacityGB 60 - ResizeGuestPartition-confirm: $false

}

else {}

Write-Host "HD1 is 60 GB or more - no action is needed" - foregroundcolor Red

}

Tags: VMware

Similar Questions

  • Configuration of the loops in LabVIEW to return to the beginning under certain conditions of CRC calculation

    Hey gurus of LabVIEW,.

    Well, I recommend also move your file in writing to be inside the loop, more precisely inside the TRUE (I could bad told you before).  If the CRC was released in 0, do you all the processing, otherwise do nothing.  Then the next iteration.  By moving the file i/o inside the loop, you're avoiding accumulate huge berries (IE a lot of memory).

  • imaqReadAVIFrame retrieves the empty image under certain conditions?

    Hello

    I'm having a problem where imaqReadAVIFrame (.) is the white recovery (all black images) under certain conditions.  The conditions seem to be when the height of the AVI file is equal to or greater than the width and the height is an odd number.  AVI files created by using the various AVI NI Vision (IMAQ 4.6.1, IMAQdx 4.6.1) functions in an application created in CVI 2012 on a computer running Windows 7 64 bit.  AVI files use MJPEG compressor, and they play back fine in an external program like VLC or Windows Media Player.  Any ideas on what this could be?  My solution for now is to not to allow the creation of AVI files where the height is odd and equal to or greater than the width that is not a boring restriction, but it seems like there's something weird happens with imaqReadAVIFrame().  I can provide some AVI files if necessary, but they are 16 + MB each.

    TStanley,

    I managed to reproduce what you see with your .avi files in a program I wrote.  I built a LabVIEW program that creates an AVI file which can be saved to memory and then uses code from the example finder to read who created the file.  I build the file to your specifications at the height is greater than the width, and the height being an odd number of pixels.  Something interesting about this, however, is that it seems to be a point where an odd height is acceptable.  Once you go below the height of 291 pixels, any odd height then works.  The files that I used are written as read in LabVIEW, but that the configuration should be irrelevant because we are seeing the same issue.  In addition, LabVIEW and LabWindows CVI calling the same dll to actually set up the code.

    In this, I think this question arises from the nature of the way you compress the. AVI file.  If you are interested to read a bit more about it, a useful link can be found here:

    http://www.manifest-tech.com/media_pc/avi_formats.htm

    However, what I think is happening, is it that MJPEG file compression format translates into creating files that cannot be read by our software unless the height in pixels is a multiple of 2 or the size of the file is below a certain limit.  To fix that, there is a simple solution. Compress the file with any of the other compression methods available (DV video, Cinepak Codec, codec Intel IYUV, Microsoft RLE, Microsoft Video) and you will be able to open the file without the black screen.  This worked for me and should solve all your problems.  I hope this gives you a bit of insight.

    Kind regards

    Keith M

    Technical sales engineer

  • How can I add a page under certain conditions?

    Hello

    I'm trying to find a way to add a page to my form under certain conditions. I tried to create this sequel to 'action', but failed to locate the correct action.

    To sum up, I am trying to add a separate page to my existing form with instructions when a specific check box is selected. The separate page is text only and does not form any entries/field. Is there a relatively simple way to accomplish this task?

    You can enter the code in the script editor. If you do not show you can get it by pressing on (on PC) Ctrl + Shift + F5.

  • My one year contract is about to expire. Can I extend the same price for two months and cancel the contract without redoing the accession of another full year?

    My one year contract is about to expire. Can I extend the same price for two months and cancel the contract without redoing the accession of another full year?

    Hello

    The plan of photography is an annual plan therefore would renew for another 12 months.

    Under the terms of subscription, an early termination fee would be applied if you have decided to cancel two months in the new contract - Adobe - General conditions of subscription

    Fill the cloud creative and plans unique app are available on a monthly basis, which can be another option - https://creative.adobe.com/plans

    Kind regards

    Bev

  • Under certain conditions allow a Feedback

    We use integrated installation of APEX flow back. We love this feature but, we will only use it in development. Is that anyway, apart from the use of JavaScript to hide or remove the link, we can have this under certain conditions depending on the environment in which the application is running?

    I know we can go turn off in the properties of the Application, but we have a ton of environments and having to manually press this switch whenever get us a new version of the application becomes tedious. I expect something more by program / data driven. For example, is it possible to return this switch integrated with PL/SQL?

    Thank you

    -Joe

    Create a compilation Option. In the development environment has defined the status on Includeand by default on export to exclude.

    Apply the Option to build on the entry page and the navigation bar of your comments. When the application is imported into a different environment the comments link and the page will not be returned.

  • Under certain conditions create script

    Hi, I want to put a redirect code in my stsytem to help, it is possible to build under certain conditions one < script type = "text/javascript" > tag?

    Any help would be great appricieated

    oooo and meta tags as well!

    You are wanting to add a Javascript within a topic and then conditionalise it so it appears only in some outings? If so, check out this part of the aid for the addition of scripts. Once it is in, you should be able to add a tag of conditional compilation to exclude required results.

    I'm not sure you can conditionalise however meta tags. Maybe if you elaborate a bit on what you're trying to reach.

  • Cannot set the Airport Extreme to extend the existing network

    Network WiFi of my holiday home is provided by the router from my ISP (Time Warner). I have an Airport Extreme, which used to be configured to provide the WiFi network to another well, and I would use it to extend the existing on the TWC router network.

    I had a lot of trouble to do a factory reset on the Airport Extreme, but I'm sure I managed (by turning on with the pressed reset button) after several attempts. At least the extreme doesn't show signs of the old network, he has provided.

    When I try to set it up in the Airport utility, he wants only to create a new network. If I click on 'Other Options' and select 'Add to an existing network', the next screen is titled "This Airport Extreme will create a network" and prompts to enter a new network name and password. (Specifying the name of the network current generates an error because the network already exists, as I expect for the creation of a new network.)

    Any ideas on how to tweak this Airport Extreme by extending a network?

    TIA,

    Doug

    P.S. I have reviewed plugging extreme in one of the TWC router EtherNet ports and create its own WiFi network (with the advantage of adding support for 5 GHz), but the last time I tried I lost all connectivity; I'm afraid that the ISP network might protect against too broad network, although the glitch may have been a coincidence. If anyone has experience/ideas on this alternative configuration, I might be willing to try again.

    AirPort Extreme would not be able to connect using a wireless connection and to extend the wireless network of the ISP, but if you can connect the AirPort Extreme to the ISP using a permanent router, wired Ethernet cable, then AirPort Extreme could be used to provide broader coverage of wireless in this way signal.

  • After the new installation of hard drive and a reinstall of Windows XP on I: function used Drive, Windows Update

    After the new installation of hard drive and a reinstallation of Windows XP I: Drive, Windows Update continually responds with: "Files required to use Windows Update are longer registered or installed on your computer" by clicking on the option to register or reinstall results by bike to the same error.

    Hi TedWie,

    Windows update no longer works for systems with SP2 or less. To check your systems service pack level, click on Start, run and typeWinver in the Run dialog box. If your system does not already have Windows XP SP3 installed, download and install XP SP3 from the link below. (Ignore warnings about professionals of computing and network facilities).

    Windows XP SP3.

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=24

    Windows XP SP2. (According to THE level of SP)

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=28

    Note:
    If your system has a Processor AMD, download and install before installation of the SP3 of XP, theUpgrade utility Microsoft for processors not intel

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?CC=UK&LC=en&softwareitem=PV-60484-2

    If you encounter problems installing XP SP3, you can refer to the procedure described in the link below to resolve an installation failure.

    How to troubleshoot a SP3 Installation fails.

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

    Let us know if this solves the problem.

  • My computer was wiped out. Now, I'm trying to reinstall Adobe Creative Cloud. I saved the program and the license on my hard drive and followed the instructions to transfer the license, but it does not work.

    My computer was wiped out. Now, I'm trying to reinstall Adobe Creative Cloud. I saved the program and the license on my hard drive and followed the instructions to transfer the license, but it does not work. Just download the program again without having charged?

    Hello

    The transfer of applications Adobe CC is not successful.

    Please download the application of Office CC from the links below and install the CC apps:

    Creative cloud to desktop

    Download, install, update or uninstall applications

    Kind regards

    Sheena

  • I want to create a Web site where people can choose a date and time and click on search, and it will find the photo of my HARD drive and show them on the page, is that poosible? If so could somone tell me how I will pay?

    I want to create a Web site where people can choose a date and time and click on search, and it will find the photo of my HARD drive and show them on the page, is that poosible? If so could somone tell me how I will pay?

    On your local HARD drive? N ° on your web server? Course

    How do you know php? There are exif function that can read EXIF headers on your images. You can use it in conjunction with the functions of file system scanning of the images on your web server. If you have thousands of images, you want to index the results in a database rather than search the real-time file system.

  • What I do when I get this message: there is not enough space left to the location of the cache... Thumbnails and previews are not generated or updated in cache on the disk.  Please leave bridge and add more disk space on the volume of the cache or change

    I don't know what that means:

    "There is not enough disk space to left to the location of the cache...  Thumbnails and previews are not generated or updated in cache on the disk.  Please leave bridge and add more disk space on the volume of the cache or change the location of the cache in the Cache preferences.  Then restart Bridge. »

    I deleted a whole bunch of photoshoots I had on my desktop, but how to make more space here?

    Erica

    Hi Ericacole

    What version of the bridge are you using and what is your OS?

    Please how much is left in your main hard drive.

    By default, the bridge cache is located at: -.

    C:\Users\Yourname\AppData\Roaming\Adobe\Bridge CC\Cache (AppData is a hidden folder)

    Note that cache bridge could be very large depending on your use of the product.

    Please see Troubleshooting of errors, freezes | Adobe Bridge | Windows, Mac OS

    Concerning

    Assani

  • When I import my .wav and my .m2V files still accepts the .wav file but does not load the .m2V file.  I created movie DVD 5 discs - still accepted the .wav and for the four remaining groups .m2V files and created 4 DVD discs for

    When I import my .wav and my .m2V files still accepts the .wav file but does not load the .m2V file. I created movie DVD 5 discs - still accepted the .wav and for the four remaining groups .m2V files and created 4 DVD discs for these files. What can I do to be free from this error?

    OSstatus = error-37

    Note that this a Mac operating system error.

    http://forums.CreativeCOW.NET/thread/145/865447

    Error when importing the file: slash or other character in file name

    http://forums.Adobe.com/message/3729601

    The build error: slash or other character in file name

    http://forums.CreativeCOW.NET/thread/145/868994

    The build error: complete startup disk

  • Under certain conditions see the popup on page (fragment) charge

    Hi Experts,

    We have an obligation to show a popup on the page load, if a certain condition is true.

    I have two fragments (home.jsff and profile.jsff). Initially when the user login, home.jsff is indicated and that there should be no popup.

    When the user goes to profile.jsff and save the changes, it must first redirect to home.jsff and show a popup with the confirmation message.

    I can't create a fragment separated for the popup where we need to redirect to profile.jsff and then redirect to home.jsff as said the requirement that the popup should display the content of home.jsff in the background.

    Also I can't use showPopup behavior during the loading of the page because it's a jsff.

    Please suggest how to implement this.

    Thanks in advance.

    Best regards

    Saurabh

    ... There's an even simpler option

    1. Add a hidden from the fragment output text element

    2 bind the output components text 'value' property to a bean property of manage (pair of getter/setter)

    3. when the getter of the value method is called, check the indicator that you defined for if you want to display the context menu or not

    4. If the indicator is such that the popup needs to be displayed, run the Java Popup

    4.a search the component RichPopup

    4.b set flags of the popup

    4.c unset flag to display the pop-up window (for the next time you need to put it)

    4.d see the popup

    Frank

  • hide the text label in the section report IR under certain conditions

    Hello
    We have a textlabel and a calculated field in a section of report to the IR 11.1.2.1. Is it possible (in a script) to hide the textlabel and field based on certain conditions, like for example, if the field computes to 'zero '?
    Thank you.

    Use a field instead of the text label. In the Expression Editor you can use the function if() {} else {}

    HTH

    Wayne

Maybe you are looking for

  • Register to install the extension for FireFox 24

    Hi, I want to automatically deploy a FireFox extension to a box via the Windows registry. Before 23 of FireFox, I use the steps in https://developer.mozilla.org/en-US/docs/Adding_Extensions_using_the_Windows_Registry to add an extension. I have deplo

  • disable the page web hyperlink underline

    I just had to Firefox 18.0 failing because some things were acting strangely. That solved my problem. I would like to hyperlinks on pages I've seen to DO NOT to point out that if I score/mouse - on top. I got this job as I wanted to reset, but now I

  • My Iphone 6s is not letting me do the hard reset, please help.

    I tried to sleep-press and hold down the button at the same time for more than 10 seconds, but she doesn't as it turned off my phone automatically. Does this mean that something is wrong with my hardware, there used to work when I got this new phone

  • Can not install the latest version of Skype: error 1603

    Hi, I get the error code 1603 spype failed while it cannot remove 6.18 version of Skype. I am currently using version 6.11, any ideas how to do to install the new version? Unable to connect. Thank you.

  • Skype does not work on android devices, once AGAIN!

    "Skype has stopped working, you want to reconnect." You know what I mean. This problem has existed for centuries, since android 2.1. Now I have an android 4.0.3 (ICS) device and yet what happened past. SKYPE, PLEASE FIX! Up to now, how is he is not y