antoniogemelli's Posts

Thanks a lot LucD, this is exactly what I need.
Hi LucD, I would like to see in Hardware-Network Adapters, Network label (in Network Connection) with port. Basically I can see those fields when I click Edit Setting for VM in Vcenter. ... See more...
Hi LucD, I would like to see in Hardware-Network Adapters, Network label (in Network Connection) with port. Basically I can see those fields when I click Edit Setting for VM in Vcenter. Thanks
Hello, Not sure if possible, I need something similar to Get all Vlan for the host and network info I need to get port and network adapter info from list of VM (txt file). Almost sam... See more...
Hello, Not sure if possible, I need something similar to Get all Vlan for the host and network info I need to get port and network adapter info from list of VM (txt file). Almost same info from previous script but with VM and from list. Thanks
Hello, I use this script from long time and it was set to run automatically with Task Manager, Recently I notice an error and report is not generated: Get-VMHost : 1/10/2020 12:01:15 PM ... See more...
Hello, I use this script from long time and it was set to run automatically with Task Manager, Recently I notice an error and report is not generated: Get-VMHost : 1/10/2020 12:01:15 PM Get-VMHost Unable to connect to the Inventory Service at 'https://******/' which is required for the tagging functionality. Additional info: An error occurred while sending the request. At line:5 char:1 + Get-VMHost | Select name, + ~~~~~~~~~~     + CategoryInfo          : InvalidOperation: (:) [Get-VMHost], ViError     + FullyQualifiedErrorId : ViCore_InventoryServiceProxy_CreateConnectInventoryServiceExceptionWrapper,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetV    MHost Get-VMHost : 1/10/2020 12:01:35 PM Get-VMHost Unable to connect to the Inventory Service at 'https://********' which is required for the tagging functionality. Additional info: An error occurred while sending the request. At line:5 char:1 + Get-VMHost | Select name, + ~~~~~~~~~~     + CategoryInfo          : InvalidOperation: (:) [Get-VMHost], ViError     + FullyQualifiedErrorId : ViCore_InventoryServiceProxy_CreateConnectInventoryServiceExceptionWrapper,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetV    MHost
Thanks KabirAli82 , good to have confirmation
Hello guys, Curiosity, can VM have different performance if host have different CPU? I have two VMs with same java processes, one use avg 50% of cpu, another 90% Those VM are in same re... See more...
Hello guys, Curiosity, can VM have different performance if host have different CPU? I have two VMs with same java processes, one use avg 50% of cpu, another 90% Those VM are in same resource pool, same configuration, same application, the only difference is hardware for cpu in host (who have different cpu). Thanks
Thanks LucD
Hello, I have some VM in some hosts where datastore is disconnected from the hosts, This VM show the disks but provisioned and used space are 0 I would like to identify these vm with host an... See more...
Hello, I have some VM in some hosts where datastore is disconnected from the hosts, This VM show the disks but provisioned and used space are 0 I would like to identify these vm with host and datastore name (with UUID) I used this as base to and then I filtered directly in CSV, but I would like to use something better, Get-VM | Select Name, PowerState, Version, NumCpu, MemoryGB,     @{N = 'UsedSpaceGB'; E = { [math]::Round($_.UsedSpaceGB, 1) } },     @{N = 'ProvisionedSpaceGB'; E = { [math]::Round($_.ProvisionedSpaceGB, 1) } } | Export-Csv -Path C:\Users\gemela\Desktop\powerstate_report.csv -NoTypeInformation -UseCulture Thanks  for support
Thanks a lot LucD , this works proper.
Hello, I have several scripts to get vm info into csv file, No idea why, but in the last period I get always long output for disk, example:   UsedSpaceGB ProvisionedSpaceGB 24.158.... See more...
Hello, I have several scripts to get vm info into csv file, No idea why, but in the last period I get always long output for disk, example:   UsedSpaceGB ProvisionedSpaceGB 24.158.326.207.939.500.000.000.000.000 25.341.041.051.689.500.000.000.000.000 24.052.384.103.182.700.000.000.000.000 25.341.055.978.182.700.000.000.000.000 23.361.345.231.067.300.000.000.000.000 24.541.032.731.067.300.000.000.000.000 23.337.542.755.436.100.000.000.000.000 24.541.058.380.436.100.000.000.000.000 23.143.484.270.293.200.000.000.000.000 24.541.042.864.043.200.000.000.000.000 This happening since I upgrade office to 365. This is script (before got readable data) $powerstate = @()     foreach($vmlist in (Get-Content -Path C:\Users\geme\Desktop\AP\ALLVM.txt)){         $vm = Get-VM -Name $vmlist     $powerstate += (Get-VM $vm |     Select Name,PowerState,Version,NumCpu,MemoryGB,UsedSpaceGB,ProvisionedSpaceGB,    @{Name="ToolsVersion";Expression={$_.ExtensionData.Guest.ToolsVersion}},@{Name="ToolsStatus";Expression={$_.ExtensionData.Guest.ToolsVersionStatus}})     }     $powerstate | Export-Csv -Path C:\Users\geme\Desktop\powerstate_report.csv -NoTypeInformation -UseCulture
Thanks a lot LucD, it work perfectly.
Hello guys, I have this script to delete old snapshots, I use to put list of VM in a txt file and then run, $logincred = Get-VICredentialStoreItem -Host 0.0.0.0 -File C:\Users\geme\my.xml... See more...
Hello guys, I have this script to delete old snapshots, I use to put list of VM in a txt file and then run, $logincred = Get-VICredentialStoreItem -Host 0.0.0.0 -File C:\Users\geme\my.xml Connect-VIServer 0.0.0.0 -User $logincred.User -Password $logincred.Password $vmlist = Get-Content C:\Users\geme\Desktop\delete1JUly.txt foreach($VM in $VMlist) { Get-Snapshot -VM $vm | Remove-Snapshot -Confirm:$false } Disconnect-VIServer -Confirm:$false Actually I would like to use this but delete snapshots only if is older than X days, this is to avoid to delete recently snapshot in VM where somebody created more than one. Thanks
Thanks a lot, I will use this, Canonical Name is not mandatory in this specific case.
Hi LucD, Is possible to add in this script Provisioned space? I'm wondering if can be useful because DRS moving datastore/VM continuously, my customer asking a csv file. Any suggesti... See more...
Hi LucD, Is possible to add in this script Provisioned space? I'm wondering if can be useful because DRS moving datastore/VM continuously, my customer asking a csv file. Any suggestion/tips? Thanks
Hello guys, I have a script for Putty who sending everyday some report from a Win directory to Linux server with scp Not sure if I can manage directly with this script, I would like to set so... See more...
Hello guys, I have a script for Putty who sending everyday some report from a Win directory to Linux server with scp Not sure if I can manage directly with this script, I would like to set some permissions on files before I sent, The Linux directory have some restrictions, directory 775 (drwxrwxr-x)  but file became from Win server with  (640 -rw-r-----) This is script: $file = Get-ChildItem -Path C:\temp\smart_backup\*.csv |   Sort-Object -Property LastWriteTime -Descending |   select -First 1 -ExpandProperty FullName $sProc = @{   FilePath = 'C:\Program Files (x86)\PuTTY\pscp.exe'   ArgumentList = "-scp -pw ******* $file smart@1.1.1.1:/data/smart/invoicing/" } Start-Process @sProc Any suggestion or I should find a way in Linux server directly? Thanks
Yes, but I raise this tread long time ago and I tested just last week
Yes of course, is your code
Hi LucD I used to put text i Notes, like that in a list of VM:
Hi LucD, I did in this way: $vmlist = Get-Content C:\Users\gemela\Desktop\list.txt foreach($VM in $VMlist) { Set-VM -VM $vm -Notes "$($vm.Notes) X environment, before reboot please conta... See more...
Hi LucD, I did in this way: $vmlist = Get-Content C:\Users\gemela\Desktop\list.txt foreach($VM in $VMlist) { Set-VM -VM $vm -Notes "$($vm.Notes) X environment, before reboot please contact  -Confirm:$false } I need in this case to put or replace existing from list of VM.
Hi LucD I would like to add or modify (if there are) notes in VM (Edit Annotation), Usually Notes are empty, I would like to add some text.