Vimal348's Posts

Hello @LucD ,   Thank you for your  reply.  I did and found lots of discussion happened regarding this Portgroup. Unfortunately I couldn't find the one what I needed for my needs. But I found an a... See more...
Hello @LucD ,   Thank you for your  reply.  I did and found lots of discussion happened regarding this Portgroup. Unfortunately I couldn't find the one what I needed for my needs. But I found an alternate option other than script, that is RVTool report. The report gives the output what I needed. But still I am lacking script
Hello, We have 20+ vCenters and 100+ portgroups in 20+ dvs Can someone please help me to pull all the standard and DV PortGroup and its VLAN information  I am expecting the output something like... See more...
Hello, We have 20+ vCenters and 100+ portgroups in 20+ dvs Can someone please help me to pull all the standard and DV PortGroup and its VLAN information  I am expecting the output something like this vCenterName      PortGroupName     VLAN      DVS_Name
https://vsaiyan.wordpress.com/2017/09/24/the-way-to-vmware-powercli-staring-and-stopping-vms/
Thanks again, that worked
LucD​, We have few VMs that has 2 tags in it. And I just noticed, in the script output I can see those 2 Tags. But in the excel output it is like below: Not showing those 2 tags. Any idea ? ... See more...
LucD​, We have few VMs that has 2 tags in it. And I just noticed, in the script output I can see those 2 Tags. But in the excel output it is like below: Not showing those 2 tags. Any idea ?   Tags System.Object[] System.Object[]
Thank you
Hello, Can someone please help me to find this: I have 2 commands to get the VMs lists (T1 for getting the VMs tag name and T2 for getting the VMs that has no Tags. Here for T1, I am getti... See more...
Hello, Can someone please help me to find this: I have 2 commands to get the VMs lists (T1 for getting the VMs tag name and T2 for getting the VMs that has no Tags. Here for T1, I am getting only VM name and Tag name. Is there any way we can add vCenter name too in the report like below ? Name              Tags        vCenter Name                  ----                  ----            -------      $T1 = Get-VM | Select Name,@{Name="Tags";Expression={(Get-TagAssignment -Entity $_).Tag.Name}} $T2 =  get-vm | ?{ (get-tagassignment $_) -eq $null} Also how can generate both output in single .xlsx or .csv format like T1 worksheet name is 'Tags' and T2 is 'No Tags'
Thats works, Like I mentioned, I have two columns 'name' and 'Name', which I dont really care about. So if we can eliminate those 2 columns and merge that would be great. Note: Those two colu... See more...
Thats works, Like I mentioned, I have two columns 'name' and 'Name', which I dont really care about. So if we can eliminate those 2 columns and merge that would be great. Note: Those two columns are not generating for all the reports, but yes for few reports
Hello LucD​ Yes you are right, there are 2 columns that has the same name (Name and name). This is an RVTool report generated automatically for many vCenters (More than 30 in weekly basis). S... See more...
Hello LucD​ Yes you are right, there are 2 columns that has the same name (Name and name). This is an RVTool report generated automatically for many vCenters (More than 30 in weekly basis). So deleting one column is really time consuming. Hence is there any other option we can mention in the script to overcome this issue? (I see it is mentioned : aders must be unique, if this is not a requirement please use the '-NoHeader' or '-HeaderName' parameter.) But I am not sure what is that.
Hello, Can someone please tell me how I am using the below script to merge excel file, got from LucD​ script is working for the first 10 excel files but not working for another set. $so... See more...
Hello, Can someone please tell me how I am using the below script to merge excel file, got from LucD​ script is working for the first 10 excel files but not working for another set. $sourceFolderPath = "D:\RVTool\Consolidated\2" $OutputFilePath = "D:\RVTool\Consolidated.xlsx" $XLfiles = Get-ChildItem $sourceFolderPath -Filter *.xlsx foreach ($XLfile in $XLfiles) {        Import-Excel $XLfile.FullName | Export-Excel $OutputFilePath -WorksheetName $XLfile.BaseName  } Set-PSRepository cmdlet This is the error I am getting : Failed importing the Excel workbook 'D:\RVTool\Consolidated\2\Test.xlsx' with worksheet '': Duplicate column headers found on row '1' in columns '70 71'. Column headers must be unique, if this is not a requirement please use the '-NoHeader' or '-HeaderName' parameter. At C:\Program Files\WindowsPowerShell\Modules\ImportExcel\7.1.1\Public\Import-Excel.ps1:216 char:21 + ...     catch { throw "Failed importing the Excel workbook '$Path' with w ... +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : OperationStopped: (Failed importin...ame' parameter.:String) [], RuntimeException     + FullyQualifiedErrorId : Failed importing the Excel workbook 'D:\RVTool\Consolidated\2\Test.xlsx' with worksheet '': Duplicate column headers found on row '1' in columns '70 71'. Column he    aders must be unique, if this is not a requirement please use the '-NoHeader' or '-HeaderName' parameter.
Thank you very much!
Hello, We have so many snapshots for multiple VMs that has the snapshot name: 'AAA_SNAPSHOT DDD.CCC.GGG.com 4572373973'. But the last part (4572373973) is different for all the VMs. Is the... See more...
Hello, We have so many snapshots for multiple VMs that has the snapshot name: 'AAA_SNAPSHOT DDD.CCC.GGG.com 4572373973'. But the last part (4572373973) is different for all the VMs. Is there a way we can delete those snapshots for all the VMs by selecting only this first part in the below script : 'AAA_SNAPSHOT DDD.CCC.GGG.com' I got the below script from LucD​ for deleting the snapshots. $vmlist = Get-Content "C:\VM\Snapshots\vmlists.txt" foreach($VM in $VMlist) {     Get-Snapshot -VM $vm -Name 'Prior to install VM Hardware' |     Remove-Snapshot -Confirm:$false } Disconnect-VIServer -Confirm:$false
Thank you very much!!
Hello LucD​, Thank you for the information. I am novice in Scripting. Appreciate if you can show me an example in your above script. Also can you please give me the commands to Remove the Tag... See more...
Hello LucD​, Thank you for the information. I am novice in Scripting. Appreciate if you can show me an example in your above script. Also can you please give me the commands to Remove the Tags from the VMs
Hello LucD​ I am sorry, I am not sure how to do this : "You will need to add the Server parameter on the Get-Tag and Get-TagAssignment cmdlets." Can the script create the Tag when it is not p... See more...
Hello LucD​ I am sorry, I am not sure how to do this : "You will need to add the Server parameter on the Get-Tag and Get-TagAssignment cmdlets." Can the script create the Tag when it is not present on the vCenter?: I am sorry, I guess Mgmt wont allow to do that Under which TagCategory?: I didnt get this question ​But its ok, anyways your script works like a charm!! Thank you for that.
Hello LucD, If I add 2 VMs in that txt file which is belongs to the vCenter: vCenter01 and, If I just connect the vCenter ‘vCenter01' in the PowerShell and run the script it works fine. But, i... See more...
Hello LucD, If I add 2 VMs in that txt file which is belongs to the vCenter: vCenter01 and, If I just connect the vCenter ‘vCenter01' in the PowerShell and run the script it works fine. But, if I connect the vCenter ‘vCenter01' and ‘vCenter02' together in the PowerShell and run the script it won’t work and I am getting the mentioned error. If I add 2 VMs in that txt file which is belongs to the vCenter: vCenter02 and, If I just connect the vCenter ‘vCenter02' in the PowerShell and run the script it works fine. But, if I connect the vCenter ‘vCenter01' and ‘vCenter02' together in the PowerShell and run the script it won’t work and I am getting the mentioned error. If I add 1 VM that belongs to ‘vCenter01’ and another VM that belongs to ‘vCenter02’ in that txt file and, connect the vCenter ‘vCenter01' and ‘vCenter02' together in the PowerShell and run the script it won’t work and I am getting the mentioned error.
Hello LucD​, Thank you for the script. The script works fine. But here is the issue. We have multiple vCenters and they are in linked mode. In powershell I have connected all those vCenters... See more...
Hello LucD​, Thank you for the script. The script works fine. But here is the issue. We have multiple vCenters and they are in linked mode. In powershell I have connected all those vCenters together and if I run this script then I am getting the below error. But if I disconnect all the vCenter (Disconnect-VIServer -Confirm:$false "*") and then connect only one vCenter then I am able to run the script. Any guess ? New-TagAssignment : 9/17/2020 2:48:18 PM New-TagAssignment The TagCisImpl - 'VM-Daily' must be managed by the same VC Server that you are using to invoke this operation. At line:5 char:26 +      Get-VM -Name $row | New-TagAssignment -Tag $tag -Confirm:$false +                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [New-TagAssignment], InvalidArgument     + FullyQualifiedErrorId : Common_SharedParameterHelper_AssertSameClient_ManagedByAnotherServer,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.NewTagAssignment
Hello, I have 3 different VMware Tags created in VMware VM-Daily VM-Weekly VM-Monthly My intention is assigning this ‘Tags’ to particular VMs. I have 3 different txt files that has all th... See more...
Hello, I have 3 different VMware Tags created in VMware VM-Daily VM-Weekly VM-Monthly My intention is assigning this ‘Tags’ to particular VMs. I have 3 different txt files that has all the VMs name in it C:\VMs_List\Daily.txt C:\VMs_List\Weekly.txt C:\VMs_List\ Monthly.txt Is it possible via a script that I can assign the VMware Tag ‘VM-Daily’ to all the VMs in the txt file ‘Daily.txt’  and ‘VM-Weekly’ to the VMs in ‘Weekly.txt’ and ‘VM-Monthly’ to the VMs in ‘Monthly.txt’ ?
Thank you LucD The script works perfectly...
Hello LucD​, Thank you for your script. Your suggestion works for the snapshot that has the name: 'Prior to install VM Hardware', Here my snapshot names are different for each VMs, but Descri... See more...
Hello LucD​, Thank you for your script. Your suggestion works for the snapshot that has the name: 'Prior to install VM Hardware', Here my snapshot names are different for each VMs, but Description is same : 'Prior to install VM Hardware', Hence, is it possible to delete the snapshot collecting that Description name: 'Prior to install VM Hardware', Upload and share screenshots and images - print screen online | Snipboard.io