script to check a setting in a file for specific entry vmx

HI friends,

I wonder if it is possible to control the specific entry VMX file via script powercli. Actually I wanted to search for all virtual machines which has "scsi0:1.writeThrough ="true"in the VMX file. You guys can help me please.

Of course, try something like this

$vmName = "VM*"$tgtFolder = "C:\Temp\VMX\"$tgtString = 'scsi0:1.writeThrough = "true"'

Get-VM -Name $vmName | %{  $dsName,$vmxPath = $_.ExtensionData.Config.Files.VmPathName.Split()  $dsName = $dsName.Trim('[]')  $ds = Get-Datastore -Name $dsName  New-PSDrive -Location $ds -Name DS -PSProvider VimDatastore -Root "\" | Out-Null  Copy-DatastoreItem -Item "DS:$vmxPath" -Destination $tgtFolder  Remove-PSDrive -Name DS -Confirm:$false}

Get-ChildItem -Path $tgtFolder -Filter "*.vmx" | Where {Get-Content -Path $_.FullName | Select-String -Pattern $tgtString} |Select Name

It displays the name of each VMX file in which the string "scsi0:1.writeThrough =" True "" is located.

Tags: VMware

Similar Questions

  • PowerCLI script to check the setting of syslog on a whole cluster?

    Hey guys,.

    I'm looking for a way to check the setting configured for syslog remote on a large cluster of ESXi. Is it possible to easily check by cluster?

    Thanks in advance,

    The following PowerCLI script will give you the servers remote syslog for all hosts in a cluster:

    Get-Cluster "MyCluster" | Get-VMHost | ForEach-Object {
      $VMhost = $_
      $VMHost | Get-VMHostSysLogServer | ForEach-Object {
        $Report = "" | Select-Object -Property VMHost,SyslogServer,Port
        $Report.VMHost = $VMhost.Name
        $Report.SyslogServer = $_.Host
        $Report.Port = $_.Port
        $Report
      }
    }
    

    Best regards, Robert

  • Where can I get the age of empires II set up the file for Windows 8

    I don't know where I will get a full version of age of empires II the age of Kings for windows 8. I tried Google, but I just. Please give me a link where I can get the full version of the game for windows 8.

    Hello

    Thanks for posting your query on the Microsoft Community.

    According to the description, I understand that you are unable to get age of Empire II set up the file.

    You can try to install it from Microsoft Store.

    https://support.Microsoft.com/en-us/pH/560/NL?WA=wsignin1.0

    You can contact the support of Age of Empires for better assistance.

    http://support.Microsoft.com/ph/7745

    Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.

  • Setting up my file for Android?

    I want to create Android apps in CS5.

    1 do I have to put my file for Adobe Air 2 or use Adobe Device Central and find Android devices?

    2. can you start a file as, say an AS3 file and change later or for Adobe Device Central Adobe Air 2? If so, how?

    Thank you.

    Hello

    Please visit http://labs.adobe.com/technologies/air2/android/ for more information on Adobe AIR for Android. You can also check out the videos at http://www.gotoandlearn.com/ on AIR for Android topics.

    Thank you!

    PS: Please mark this message as answered if it is a help to you.

  • How to set a default file for the recording of the work type

    Looking and looking, is there really no way to define the type of default file for the recording of the Photoshop work?

    Not save as.  After this adjustment, just use Ctrl s

    Try this:

    Make a new file

    Save as and Ctrl, click on the PNG format

    Be another file and use Ctrl s.  The Save dialog box opens and the format will always be PNG

    Use Save as, and Ctrl-click on PDF

    Make another new file and Ctrl s.  PDF will now be the format.

    Who is?

  • script to check a setting in a vmx file

    I'm relatively new to the thing of powershell and I seek assistance to create a simple script that will analyze by vmx files, search for the disk.enableUUID parameter. We had to put a lot on false to enable backups, and with a new version of the backup software, I'm looking to find those virtual machines, so I can't change back to true... the settings using the advanced settings in the General settings of the virtual machine

    Try something like this

    foreach($vm in Get-VM){
      $vm.ExtensionData.Config.ExtraConfig |  where {$_.Key -eq "disk.enableUUID"} |  select @{N="VM";E={$vm.Name}},@{N="disk.enableUUID";E={$_.Value}}
    }
    
  • How to set the ALX file for compatibility of the storm

    Well, he can't ' be that lasts.  How to set a value in the ALX file so that my application when it is installed by the Manager of funds an ALX and COD file, behaves like a native storm app?

    Anyone?

    Thank you

    Gerry

    I asked this before but never got a response from RIM.

    I guess that they neglected to provide a way to do it.

    Strike 3 for compatibility mode.

  • setting up multiple files for storage on the sidebar in mail

    How can I configure multiple files storage on the sidebar in mail

    Mail/Mailbox/new mailbox. Generally better to create the mailbox on my Mac when it is used for storage.

  • GENERATION OF THE LDT FILE FOR SPECIFIC SUBMENU OF THE MENU

    Hello

    I am creating a menu using the script below in the TDL file.

    $FND_TOP/bin/FNDLOAD apps / $CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct ICX_POR_SSP_HOME.ldt MENU menu_name = "ICX_POR_SSP_HOME."

    It works very well. If 10 submenus are attached to the menu, it generates all the submenus using script above in the TDL file.

    My requirement is, I want to generate LDT only for some specific subemenus for this menu.

    Is there any script or any other alternative to it.

    It is very urgent, please help me as soon as possible.

    Thanks in advance.

    Hello

    You can use the PARENT_MENU_NAME and SUB_MENU_NAME parameters to try to only get submenus you need. This works if you only need a submenu, or submenus are appointed in the same way. You could also manually delete submenus you don't need the ldt generated.

    It will be useful.

  • How to check the growth of the database for a database on ASM?

    Hello

    I have been using the following script to check the growth of the database (for DBs on file system):
    SELECT b.tsname tablespace_name ,
      MAX(b.used_size_mb) cur_used_size_mb ,
      ROUND(AVG(inc_used_size_mb),2)avg_increas_mb
    FROM
      (SELECT a.days,
        a.tsname ,
        used_size_mb ,
        used_size_mb - LAG (used_size_mb,1) OVER ( PARTITION BY a.tsname ORDER BY a.tsname,a.days) inc_used_size_mb
      FROM
        (SELECT TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY') days ,
          ts.tsname ,
          MAX(ROUND((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) used_size_mb
        FROM dba_hist_tbspc_space_usage tsu ,
          dba_hist_tablespace_stat ts ,
          dba_hist_snapshot sp,
          dba_tablespaces dt
        WHERE tsu.tablespace_id    = ts.ts#
        AND tsu.snap_id            = sp.snap_id
        AND ts.tsname              = dt.tablespace_name
        AND sp.begin_interval_time > sysdate-7
        GROUP BY TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY'),
          ts.tsname
        ORDER BY ts.tsname,
          days
        ) a
      ) b
    GROUP BY b.tsname
    ORDER BY b.tsname;
    And I think that he always gave me good results until I ran this script on a database (10.2.0.5) on ASM.

    Is it because the databases on the ASM are maintaied differently, OR do most proabbly there was no activity on this database in the last 7 days? I even ran this query for last 90/180 / day and it is me again after results:
    TABLESPACE_NAME                CUR_USED_SIZE_MB AVG_INCREAS_MB
    ------------------------------ ---------------- --------------
    SYSAUX                                   574.38            .36
    SYSTEM                                   514.69              0
    DATA                                    1593.25              0
    IDX                                         .06              0
    UNDOTBS1                                  69.06          -3.84
    USERS                                     96.13              0
    Thanks in advance!

    I have no reason to believe tablespaces under ASM are maintained differently, so the most likely explanation is the change in the activity of the DB.

    What is your AWR retention? The default value is 7 days, so if yours is set to the default value, and then by running the query for 90/180 days you would not give more information.

    If you want to get the output of your scripts, you may need to adjust the AWR retention and your tablespace SYSAUX respectively.

    If the DB is managed by Oracle Enterprise Manager (OEM), you can make tablespace forecast based on the measurements taken by the OEM. I did a presentation on this (NYOUG, VirtaThon) just now:
    http://iiotzov.files.WordPress.com/2011/08/iotzov_oem_repository.PDF
    http://iiotzov.files.WordPress.com/2012/05/OEM-repository-a-second-look.doc

    Lordane Iotzov

  • R12.2.5 Installation on OL 7.1 ERROR: RW-50010: error:-script returned an error: 1 RW-50004: error code when you run the external process.  Check the log file for more details

    I tried to install EBS 12.2.5 on OL 7.1 with rapidwiz and got this error when applying the unique patches in second File System

    "Second system logfile file - /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/logs/12021641.log.

    LOG FILE:

    _____________________________________________________________________________________________________________________________

    Step 0-8

    Command: /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/adrunfmw.sh

    Step 4 of 8: UNIX making pretreatment

    Running: chmod 777/db/oracle/OraInventory r

    chmod-r 777/db/oracle/OraInventory succeeded

    Step 4 of 8

    Performance: known appltest - c "/ app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/adrunfmw.sh".

    PHASE of INSTALLATION has BEGUN: APPS TECH STACK: Wed Dec 2 17:27:07 IST 2015

    runProcess_1

    StatusString installation of Applications Technology Stack

    Copy the temp area models

    Inventory name is: app_oracle_TEST_fs2_Oracle_EBS_app

    One-time fixes copy to temp area

    Remove JDK_TOP: / app/oracle/TEST/fs2/EBSapps/comn/util/jdk32 if there is

    / App/oracle/TEST/fs2/EBSapps/comn/util/jdk32 deleted directory

    Installation of WebLogic Server.

    With the help of /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instWLS.xml

    L'exécution de commande : /stageR12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.6.0/bin/java -cp /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/ASInstallHome/fnd /... /j11067592_fnd.zip:/app/Oracle/test/FS2/inst/Apps/TEST_ebs122/Temp/ASInstallHome/FND/Java/3rdparty/stdalone/xmlparserv2.zip-Doracle.apps.fnd.txk.env_home=/app/oracle/TEST/fs2/EBSapps/appl/admin/TEST_ebs122/-Doracle.apps.fnd.txk.runtime.config=/app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instWLS.xml oracle.apps.fnd.txk.config.InstallService

    WebLogic Server successfully installed

    Web Tier utility installation.

    With the help of /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instWeb.xml

    L'exécution de commande : /stageR12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.6.0/bin/java -cp /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/ASInstallHome/fnd /... /j11067592_fnd.zip:/app/Oracle/test/FS2/inst/Apps/TEST_ebs122/Temp/ASInstallHome/FND/Java/3rdparty/stdalone/xmlparserv2.zip-Doracle.apps.fnd.txk.env_home=/app/oracle/TEST/fs2/EBSapps/appl/admin/TEST_ebs122/-Doracle.apps.fnd.txk.runtime.config=/app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instWeb.xml oracle.apps.fnd.txk.config.InstallService

    Level successfully installed Web utilities

    Registration EBSUsing /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instEBS.xml

    L'exécution de commande : /stageR12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.6.0/bin/java -cp /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/ASInstallHome/fnd /... /j11067592_fnd.zip:/app/Oracle/test/FS2/inst/Apps/TEST_ebs122/Temp/ASInstallHome/FND/Java/3rdparty/stdalone/xmlparserv2.zip-Doracle.apps.fnd.txk.env_home=/app/oracle/TEST/fs2/EBSapps/appl/admin/TEST_ebs122/-Doracle.apps.fnd.txk.runtime.config=/app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instEBS.xml oracle.apps.fnd.txk.config.InstallService

    EBS registered successfully

    Rename/home/appltest/bea/beahomelist in /home/appltest/bea/beahomelist.29266 to avoid problems during WLS

    patching

    / Home/appltest/Bea/beahomelist renamed successfully.

    Application of ad hoc patches

    With the help of /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instASpatches.xml

    L'exécution de commande : /stageR12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.6.0/bin/java -cp /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/ASInstallHome/fnd /... /j11067592_fnd.zip:/app/Oracle/test/FS2/inst/Apps/TEST_ebs122/Temp/ASInstallHome/FND/Java/3rdparty/stdalone/xmlparserv2.zip-Doracle.apps.fnd.txk.env_home=/app/oracle/TEST/fs2/EBSapps/appl/admin/TEST_ebs122/-Doracle.apps.fnd.txk.runtime.config=/app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/xmldocs/instASpatches.xml oracle.apps.fnd.txk.config.InstallService

    Fatal error: T2K install Service

    oracle.apps.fnd.txk.config.ProcessStateException: OPatch process failed: Output = 1 see log for more details. CMD = perl /app/oracle/TEST/fs2/FMW_Home/webtier/OPatch/opatch.pl apply - verbose - silent - ocmrf /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/ASInstallHome/fnd/admin/template/txkForms_ocm.rsp jdk - / app/oracle/TEST/fs2/FMW_Home/webtier/jdk/app/oracle/TEST/fs2/inst/apps/TEST_ebs122/temp/patches/7695070/7695070

    at oracle.apps.fnd.txk.config.OPatchActionNode.processState(OPatchActionNode.java:312)

    at oracle.apps.fnd.txk.config.PatchActionNode.processState(PatchActionNode.java:187)

    at oracle.apps.fnd.txk.config.PatchNode.processState(PatchNode.java:338)

    at oracle.apps.fnd.txk.config.PatchesNode.processState(PatchesNode.java:79)

    at oracle.apps.fnd.txk.config.InstallNode.processState(InstallNode.java:68)

    at oracle.apps.fnd.txk.config.TXKTopology.traverse(TXKTopology.java:594)

    at oracle.apps.fnd.txk.config.InstallService.doInvoke(InstallService.java:224)

    at oracle.apps.fnd.txk.config.InstallService.invoke(InstallService.java:237)

    at oracle.apps.fnd.txk.config.InstallService.main(InstallService.java:291)

    Can not install the unique patches

    RW-50010: error:-script returned an error: 1

    RW-50004: Error Code when you run the external process.  Check the log file for more details.


    It was recorded in /app/oracle/TEST/fs2/inst/apps/TEST_ebs122/logs/12021641.log and I don't know how to find another newspaper for such details as mentioned in this journal. Please help me with that.


    Concerning

    KasunA

    Found a workaround.  The problem is that, before the 7695070 patch is applied, the installation program backup directory/apps/fs2/FMW_Home/webtier/jdk in /apps/fs2/FMW_Home/webtier/jdk_backup_existing_version, but then it clears. / jdk - the patch fails because it can't find it.  I had to rename the directory of the jdk for jdk2, and as soon as it gets deleted quickly and rename jdk2 jdk.  Then he applies the patches without problem.  A symbolic link would do the same thing.

  • Hi, back back can check files you opened with "recent files"? With my current setup, I can only see the last 10 files. Can I change the setting to display the last 20 files for example? Thank you

    Hi, back back can check files you opened with "recent files"? With my current setup, I can only see the last 10 files. Can I change the setting to display the last 20 files for example? Thank you

    File management preferences is where you can change the number. I don't know the maximum.

  • Script to check how the host in the domain and add it to domain

    Hi all

    AM face to face strange question as some or little my esxi host is out and it will be difficult to connect and run to another regular activity.

    Is there a script that can check together how esxi host are out of area and another script that can add back to the domain.

    Thank you in advance for a ton

    Hello.

    This little script will check all your hosts domain name, if none it will put the hostname to out.txt file to the current folder:

    $hostnet = Get-VMHost |Get-VMHostNetwork
       $hostnet |foreach{
       if (!$_.DomainName)
        {
        $_.HostName|out-file .\out.txt
        }
    
       }
    

    Second scenario takes the output generated by the first and adds the domain name of your choice to the host. It will ask you confirmation.

    $nodomainhost = Get-Content .\out.txt
    $domain = "your.domain"
    $nodomainhost|foreach {
    Set-VMHostNetwork -HostName $_ -DomainName "$domain" -Confirm:$true
    }
    
  • In the tab "Regional and Language Options", "Language support additional" Section__Install files for complex scripts is greyed out, cannot uncheck the box

    Hello, I have two problems with the language bar Options:

    1. I can't uncheck the checkbox "Install files for complex scripts and right-to-left languages" because the box is checked and grayed out. Could someone please suggest how to disable and uninstall the files?

    2. when I run Windows icon does not automatically appear in the taskbar until the language bar I click anywhere on the desktop (who does appear instantly). Someone has any idea how to solve the problem?

    Thanks in advance for your help

    Hello

    I experienced a few problems here which was virtually anonymous to your problem, I wasn't able to check it out instead of clear.
    Clear the check box, you must insert the CD of installation for the i386 file and then process. It could be solved.
  • Clink Manager. script/util/common js by default Java files are not included

    Clink Manager. script/util/common js by default Java files are not included. I got this when I tried to send pictures to Walgreens.

    What it means

    Hello

    1. what browser you use to upload photos?
    2. If you use Internet Explorer (IE), then what version?
    3. What is the format of the files you are trying to download?

    If you use Internet Explorer, then try to reset IE and check if it helps.

    Refer to this article for help:
    http://support.Microsoft.com/kb/923737

    Note: the Internet Explorer the reset parameter would delete all browsing history, saved passwords and forms on your computer.

    Please provide us with some information so that we can help you solve the problem.

    Kind regards
    Afzal Taher - Microsoft technical support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • SIMS 2 works do not because of copy protection?

    I just bought the laptop satellite M60 who should have just asked in the game The Sims 2. I installed the program but when I want to play, a window will appear "this program has caused an error and closes. I read on another page that maybe it's becau

  • VPCCW21FX video card

    How do I know what VPCCW21FX video card Thank you Omar

  • How a 14 bit camera does not have a 16-bit image with IMAQdx?

    Hello I use camera firewire Guppy Pro F-031.   And I'm the program with IMAQdx.This camera AD converter is 14bits, and I expected that the strokes per pixel of this unit should not exceed 2 ^ 14.  In the attached photo, the maximum number allowed for

  • BlackBerry Smartphones that are these icons & how to remove?

    It seems that I can not post a screenshot... Well, there are two icons exactly where notifications appear, a large, white and looks like two circles connected by a stick, the other and much smaller, black and looks the same... But I have no new notif

  • Last 6 updates Windows have failed; get the error message 8E5E0147

    I had a successful Windows since 4.22.13 update. I tried to manually run these updates, but still get error message 8E5E0147. I have not updated the following text: KB2820197 - s updated for the stop bit ActiveX KB2829530 - s updated for Windows 7 KB