Get-Stat ESXI and get average per day
Hi for all!Very simple script:$entities = Get-VMHost esx-01 $stat = "cpu.usage.average" $start = (Get-Date).AddDays(-4) Get-Stat -Entity $entities -Stat $stat -Start $start | Select...
View ArticlePowerCLi refresh network information
Hello, I need to add a new Host to a Cluster using PowerCLi. I can configure the host settings using PowerCLi but when I try to add the Host to my DVSwitches I get an error message "Add-VDSwitchVMHost...
View ArticleNeed script to add-to-inventory every VM on a datastore
Hi all, I need a script to add-to-inventory every VM on a datastore. Any suggestions? Thanks! -Chris
View ArticleGet Hardware changes
Hi all,I'd like to get hardware changes (CPU and Memory) since VM was created until today. Anyone has this powercli to share with me ?Thanks in advanced.
View ArticleNew-VDSwitch - Can I ask vCenter, what versions are supported
I'm writing a script to create new VDSwitches based on a predefined set of standards. In order to try and future-proof the script, I'd like to set it to create the highest version number supported by...
View ArticleCleanup PowerCLI 6.5.x old directories after update-module ?
I noticed that when I update-module PowerCLI the old versions aren't removed. Is there a way to cleanup this ? i.e. automatically remove the old module versions ? Of course I can do this manually but...
View ArticleNeed Help to automate Poweroff, SVMotion (and VMotion), Upgrade VM Hardware...
Hi there, I'm trying to build a powercli script to perform the following actions: Poweroff a list of VMs VMotion to the new hostsUpgrade VM Hardware and tick the VMware Tools upgrade at next power...
View ArticleCan I set CIVM name, CIVM computername or other parameters via PowerCLI
Hello!The main question in topic. I tried this one example:$VM = get-civm 'centos_template'($VM.ExtensionData.Section | where {$_ -is...
View ArticleCannot connect to vCenter server
Hi!I'm trying to connec to to a vCenter server from powershell session with PowerCLI module loaded but receive the following error:Connect-VIServer : Could not load file or assembly 'VMware.Vim,...
View ArticleNon-Persistent
HI guru Does anyone has a script that will let me know which VM in a cluster has an RDM disk on disk mode Non-Persistent. is this even possible? Thanks a bunch gurus
View ArticlePowerCLI delete unused TAGs
Hello.Anybody have powercli script for tags cleaning: find tags that no attached to any object and delete them?
View ArticleThe guest operations agent is out of date, stopping script from continuing...
advanced apology/warning!:I have tried to format my post to show the script nicely/properly using guide I was previously pointed to by a member on here but it just won't (not sure if it's because it's...
View Articlemove-vm returns array out of bounds
Hello, I feel stupid but I can't move a VM into a specific VM folder ? When I do it the old way, using "-Destination" I get a warning about "destination switch" being deprecated + an error telling me...
View ArticleIdentify vMotion or Management portgroup in a dVS
Hello, first of all I'd like to inform that I'm not able to open a thread by simply logging into the VMware communities. I'm redirected to "temporary unavailable" message due to maintenance etc..etc.....
View Article(Get-DataStore ) How to find out which Datacenter is using the same datastore
Hi,A newbie question:How can I find out which Datacenters are using the same Datastore. The command I'am using is:PS C:\Windows\system32> Get-Datastore -name 'Templates' | where{$_.FileSystemVersion...
View Articlevcsa 6.5 trying to automate the backup - authentication failure
Hello I tried to make the Backup-VCSAToFile work in my development environment. vSphere 6.5 – Automate VCSA Backup » Brian Graf's Virtualization Blog I'm stuck here:A server error occurred:...
View Articlehttps://code.vmware.com/web/tool/11.2.0/vmware-powercli download link not...
https://code.vmware.com/web/tool/11.2.0/vmware-powercliVMware-PowerCLI-11.2.0-12780525.zip download link not update!
View ArticleJobs hanging when scriptblock needs to print output
Hello there,I've found many thread and forum that were subject to this bug (?), but I didn't find a solution that suits my environnement...I'm working on a Linux CentOS 7 with a PowerShell 6.1.1...
View ArticleWARNING: Parameter 'OSCustomizationSpec' is obsolete. This parameter no...
I've been seeing this warning message when calling New-OSCustomizationNicMapping for a while now. No one seems to have commented on it anywhere online, which is odd. I create my customization using...
View ArticleFetch custom field / attribute for VM
All, I have VMs protected by ReocverPoint appliance and under VM summary tab it shows all relevant information. (Please refer attached screenshot). I would like to click on Unprotect button as shown in...
View Article