Skip navigation
VMware
669 Views 5 Replies Last post: Mar 21, 2012 1:38 PM by Ruben.es RSS
Ruben.es Enthusiast VMware Employees 89 posts since
Nov 3, 2008
Currently Being Moderated

Mar 3, 2012 4:38 PM

Scripted linked-cloning & pseudo-LabManager with PowerCLI

Here you can find the code of the scripts I published on the vmutils blog.

 

This place has better functionality for questions/discussions so I will try to keep them here. However, if you don't have a communities account you can post your question on the blog (doesn't require account).

 

I suggest you run "# Set-ExecutionPolicy bypass" in the PowerCLI shell before using the scripts to avoid having to answer questions every time you use them. For more info see this and this

Attachments:
jbrowne Hot Shot VMware Employees 190 posts since
May 18, 2005
Currently Being Moderated
1. Aug 9, 2011 3:43 AM in response to: Ruben.es
Re: Scripted linked-cloning & pseudo-LabManager with PowerCLI

Running the .\NLclonePodsofVapp.ps1 keeps asking me to confirm Security Warnings



PowerCLI C:\training\PowerCLI\Scripts\ClonevApps> .\NLclonePodsofVapp.ps1 SRM-Base-Config SRM50-Student 1

 

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer.
Do you want to run C:\training\PowerCLI\Scripts\ClonevApps\NLclonePodsofVapp.ps1?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): R

vSwitch created

 

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer.
Do you want to run C:\training\PowerCLI\Scripts\ClonevApps\LcloneVapp.ps1?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): R

 

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer.
Do you want to run C:\training\PowerCLI\Scripts\ClonevApps\LcloneVM.ps1?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): R

 

Name                 PowerState Num CPUs Memory (MB)
----                 ---------- -------- -----------
SRM50-Student-Pod... PoweredOff 1        2048

 

MacAddress       : 00:50:56:01:00:cb
WakeOnLanEnabled : False
NetworkName      : SRM50-Student-Pod01
Type             : e1000
ParentId         : VirtualMachine-vm-208
Parent           : SRM50-Student-Pod01-CEL-A
Uid              : /VIServer=administrator@10.21.71.141:443/VirtualMachine=VirtualMachine-vm-208/NetworkAdapter=4000/
ConnectionState  : NotConnected, GuestControl, StartConnected
ExtensionData    : VMware.Vim.VirtualE1000
Id               : VirtualMachine-vm-208/4000
Name             : Network adapter 1

jbrowne Hot Shot VMware Employees 190 posts since
May 18, 2005
Currently Being Moderated
2. Aug 9, 2011 4:04 AM in response to: jbrowne
Re: Scripted linked-cloning & pseudo-LabManager with PowerCLI

Running the removeLclonePods

 

1. Does not list the switches to be deleted

2. Does not delete the vSwitch after the vApp is deleted

 

 

PowerCLI C:\training\PowerCLI\Scripts\ClonevApps> .\removeLclonePods.ps1 SRM50-Student-Pod

 

 

Do you want to delete from disk the following vApps and vSwitches?
Note that the vSwitch should only be removed when ALL the Pods with the corresponding name are NOT going to be used anymore.

 

------ vApps -------------

 

Name
----
SRM50-Student-Pod01

 

------ vSwitches ---------

 


Answer y/[n]?: y


Bookmarked By (0)

Share This Page

Communities