Hi Fellow VM Admins
I have got a question regarding a PowerShell script which was developed by one of our previous VM admins who was a bit of script guru who managed to create a script which we use as part of disaster recovery process.
Unfortunately my knowledge with PowerShell scripts is limited and I could do with some help.
In summary we use this script as part of our DR recovery process to clone our volumes from our NetApp array using the NetApp flexclone method to bring our VMs online within minutes however the performance of that array is poor so we want to utilize another array which has higher performing disks. We use this PowerShell script to effectively interrogate a particular VM folder and it will literally process any VMs located on a particular storage which starts with the name 'snap' and if it identifies this, it will the move to another storage array in a sequential order.
As part of one of the variables defined we use $VM_LOCATION so the script knows which folder to look in to interrogate but ideally I need to amend this slightly so that it can interrogate sub folders within that main folder.
I attach the script in txt format.
Is this possible? Is anyone able to help me?
I have tried to look for a variable which would meet this need but I cant seem to find one.
Any help on this would be most appreciated.
If I understand correctly, you want tpspecify a blue folder in $VM_LOCATION, but you want the selection of VMs (which goes into $FoundVMs), to also look in all subfolders of the folder specified in $VM_LOCATION.
- you have the following blue folder hierachy
- when you specify 'Folder1' in $VM_LOCATION, you want the script to also look for VMs in the blue folders Folder2, Folder3 and Folder4.
Is my interpretation correct?
Its not helpful unfortunately. Its just purely an output of what is running.
** 2017-10-06 14:58:24 **
Scripted SVMotion started
** 2017-10-06 14:58:36 **
Name Port User
---- ---- ----
vCentreServer 443 DOMAIN\myusername
** 2017-10-06 14:58:37 **