This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * **************************************************************************** | |
| * Copyright VMware, Inc. 2010-2016. All Rights Reserved. | |
| * **************************************************************************** | |
| * | |
| * This software is made available for use under the terms of the BSD | |
| * 3-Clause license: | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * **************************************************************************** | |
| * Copyright VMware, Inc. 2010-2016. All Rights Reserved. | |
| * **************************************************************************** | |
| * | |
| * This software is made available for use under the terms of the BSD | |
| * 3-Clause license: | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * **************************************************************************** | |
| * Copyright VMware, Inc. 2010-2016. All Rights Reserved. | |
| * **************************************************************************** | |
| * | |
| * This software is made available for use under the terms of the BSD | |
| * 3-Clause license: | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * **************************************************************************** | |
| * Copyright VMware, Inc. 2010-2016. All Rights Reserved. | |
| * **************************************************************************** | |
| * | |
| * This software is made available for use under the terms of the BSD | |
| * 3-Clause license: | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ######################################################################## | |
| # Code Generated By: Win@lex16 | |
| # Generated On: 14/03/2016 08:21 | |
| # Generated By: VROPS script | |
| ######################################################################## | |
| #Variables | |
| $Vcenter = Read-host "vCenter target server" | |
| $Vrops = Read-host "VROPS target server" | |
| $Date = Get-Date -format "dd/MM/yyyy HH:mm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| connect-viserver <vCenter IP Address> | |
| 1..8 | Foreach {New-vm -vmhost <hostname> -Name io-analyzer-$_ -Template <template name> -Datastore <datastore name> -ResourcePool <resource pool name> -RunAsync} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #PowerCLI ****Remove all ESXi hosts from vCenter and readd them again.**** | |
| vSphere PowerCLI> $esx = get-vmhost | |
| PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> echo $esx | |
| Name ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz MemoryUsageGB MemoryTotalGB Version | |
| ---- --------------- ---------- ------ ----------- ----------- ------------- ------------- ------- | |
| 192.168.1.30 Connected PoweredOn 2 252 5600 3.727 4.000 5.5.0 | |
| 10.0.0.30 Connected PoweredOn 4 1385 11196 3.725 4.000 5.5.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //action inputs: | |
| // vm - VC:VirtualMachine | |
| var nicsToDelete = []; | |
| var changeVersion = vm.config.changeVersion; | |
| var devices = vm.config.hardware.device; | |
| for (var i in devices) { | |
| if (isNic(devices[i])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Resolve-Error ($ErrorRecord=$Error[0]) | |
| { | |
| $ErrorRecord | Format-List * -Force | |
| $ErrorRecord.InvocationInfo |Format-List * | |
| $Exception = $ErrorRecord.Exception | |
| for ($i = 0; $Exception; $i++, ($Exception = $Exception.InnerException)) | |
| { “$i” * 80 | |
| $Exception |Format-List * -Force | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mccli client show --recursive | awk 'NR>4' | awk 'NR<2' | awk '{print $2}' | while read i; do avmgr getl --path="$i";done | awk 'NR>1' | awk '{print $2}'| while read i; do capacity.sh --client="$i" --days=5; done | tee -a ClientRateReport.txt |