Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Browsing all 16717 articles
Browse latest View live

Get-VM Stats question.

Trying to fetch data for all VMs the average usage of CPU and Memory for last 6 months. Below script is working fine for average memory usage in %, but not sure how to make it working for CPU average...

View Article


Image may be NSFW.
Clik here to view.

"Invoke-VMScript -ScriptType BAT "return garbled when guestos is Chinese edition

GuestOS:Win2016 core Chinese editionESXI version: 6.5.0 Update 1 (Build 5969303)PowerCLI version: 6.5 R1 4624819vmware tools version:10.2.0-7253323 ===1: BAT===$VM = 'Win2016-SC-Core'$script...

View Article


Way to automate VCSA syslog and root account expiry?

Is there a way to automate via API/PowerCLI the following:Stop the VCSA root password from expiringPopulate the Syslog info accessible from within the appliance management page Thanks in advance

View Article

Detach unused RDMs from ESXi Cluster

Hi, I am issues detaching unused RDMs from ESXi Cluster. I am using below script and getting error Connect-viserver 10.10.10.10$lun = "naa.60a98000424c7841583f4a596b73556e"Get-Cluster -Name My-Compute...

View Article

List to get unused disks in vCenter

Hi, Please help to get the list of unused disks in vCenter. We have removed few RDMs and I would like to know the unused disks which is not a part of Datastores or RDMs Please help

View Article


Convert Get-Date into Unix EPOCH Format

I am trying to convert date into Unix epoch format as I need to insert data into influxdb with historic timestamp. (Get-Date $StartDate -UFormat...

View Article

how to manipulate .list() as array?

Hi, I'm trying to manipulate data output from a $esxcli.network.nic.list() as an array.... but it seems it's not an array?!Is there a solution to manipulate output from a *.list() ? Thanks,

View Article

Simple PowerCLI script despite Powerpath

Hello all. In the vSphere fat client, if you look at a specific host's storage adapters, then click the "Paths" button you can see the following columns; "Runtime Name", "Target", "LUN", and "Status"....

View Article


Try to create new VM when connected to multiple servers

Hi, I'm trying to combined several scripts into one and make it automated.Currently in our environment, we have 2 different Vcenter, so I use "Set-PowerCLIConfiguration -DefaultVIServerMode multiple...

View Article


Image may be NSFW.
Clik here to view.

Script to count host build numbers

Hi, Our environment has a mixture of hosts on different build numbers. I'm trying to write a script that will show a count of how many hosts are running each build number. That way I can export it to...

View Article

Invoke Vm Script with Multi line Text Doesnt work

Hi, Am trying to use the below command . The txt file is not created in the temp dir. PowerCLI C:\> $scripttext=@'>>>>>> set output_file=%TEMP%\ipconfig_output.txt>>>>...

View Article

Document to describe the PowerCLI commands

Hi Experts,  Do you know where to download the document to describe the PowerCLI commands for the SRM? All the functions and the parameters?  Thanks.

View Article

server Certificate with HTTP.SYS error while connect-viserver on powercli

I'm getting below error while connecting to the server from powercli. It was working till yesterday and getting this error while no changes been performed on vCenter server.Could someone please help to...

View Article


ESXi and VCSA - Failed login Audit report - moved from vSphere noobs

Hi all,  I need to do reports on failed logins ( as I'm sure many do ) I'm in a simple environment with several esxi5.5 boxes reporting to a VCSA 6.0 I can get most of the failures ( ESXi ssh,...

View Article

Extract VM's complete folder strcuture

Hello Techies, Need help, am pretty new to scripting. I need to extract the Complete Folder structure of VM's using Powercli/ Powershell script. As per the attached screen shot. The kind of output I'm...

View Article


get all powered on vms windows type

hi any idea why this is not working? get-vm | ? {$_.powerstate -eq "PoweredOn" -and {$_.extensiondata.guest.guestfullname -match "Microsoft*"}} its showing linux as well

View Article

Running automated scripts with stored credentials or integrated authentication

Hi guys, I've a bunch of scripts that I have written and wish to have them run automatically but the issue I'm facing is they all use the connect-viservercmdlet. The scripts all run under an account...

View Article


Check VM services

Hello, I would like to have a script to check specific services in a specific VM. Not sure if is possible but maybe there is a way :-)

View Article

The cmdlet "Update-Tools": What happens to the VMware Tools components when I...

Hi I want to use PowerCLI scripting to update VMware Tools. The cmdlet that I believe I should use is...

View Article

Get all VMs not in the INFRA folder

Hi guys, I would like to select all VMs in my environment that DO NOT reside in the INFRA folder.  I'm not having much luck doing it on my own, I would imagine it's something like: get-folder | select...

View Article
Browsing all 16717 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>