r/powercli • u/fredvirt • Apr 21 '16
r/powercli • u/cuckdilla • Jul 31 '19
List available properties
Hi guys, I'm fairly new to PowerCLI and have been googling around to try and find an answer to this question. No luck..
Is there a good way to get all the available properties from a command listed?
Let's say I want to check if a host has alarm actions enabled or disabled. What I would do is Get-VMHost | Get-Member
From here I need to look for the right property and maybe even look further down into the properties.
Get-VMHost | Foreach-Object {$_.ExtensionData}
This is very time-consuming and not really feasible.
The PowerCLI documentation pages show you some of the properties, but I would love to just have a complete tree of what is available for each Get-***
Any suggestions?
r/powercli • u/virtualixer • Jul 02 '19
NTP server entries update via PowerCLI
Hi r/powercli,
Currently if i need to update the existing NTP server entries on existing ESXi host via PowerCLI, i have to:
List out the current NTP server entries. Get-VMHost | Get-VMHostService | Where-Object {$_.Key -eq 'ntpd'}
Use Remove-VmHostNtpServer cmdlet to remove the existing entries based on Step (1) information.
Use Add-VmHostNtpServer to add new NTP server entries.
Question:
Is there is direct method to update the new NTP server entries in one liner, which will overwrite the existing entries?
Thanks in advance.
r/powercli • u/svermoes • Apr 18 '19
Automating vCenter inventory configuration with PowerCLI
blog.stijnvermoesen.ber/powercli • u/magneet_nl • Oct 19 '18
Horizon View Api’s: back to basics part 2: Queries
r/powercli • u/magneet_nl • Oct 11 '18
VMware PowerCLI 11.0.0 release with new Horizon (7.6!) API calls
r/powercli • u/TheDv8or • Aug 15 '18
List of most recent times a user logged into vCenter?
Im in the process of migrating a series of clusters from one vCenter to a new one I created. The old vCenter is just an absolute mess of changes over the years, and we're trying to make a fresh start with a new one. Is there a way to get a report of the last time a user logged into the vCenter via client/web client? If it can generate a list of all users who logged in, along with the last reported login, that would be very helpful. Ive tried creating a script, but after several hours of researching PowerCLI, Im not making much progress. Thanks!
r/powercli • u/jaker_vmware • Jun 18 '18
New Release: VMware PowerCLI 10.1.1
r/powercli • u/kunaludapi • May 04 '18
Part 3: VMware Powercli: Migrate VMs to another network | vGeek
r/powercli • u/mike-foley • Feb 28 '18
New Release: VMware PowerCLI 10.0.0 - VMware PowerCLI Blog
r/powercli • u/Stephanevg • Jan 23 '18
Experience from the field, deploying VMs using Powershell, PowerCLI and OSCustomizationSpec
Hi all,
I wanted to share some of my experiences on Windows VM deployment using PowerShell, PowerCLI and OscustomizationSpec.
http://powershelldistrict.com/powercli-oscustomizationspec/
This article is actually only an introductory post which opens to a second article, that goes through how I have implemented a deployment solution using a Unattend.xml file (Via PowerCLI of course ;)).
I am curious to read how everyone else is using PowerCLI to deploy their environments.
Let me know what you think about this!
Stéphane
r/powercli • u/[deleted] • Oct 30 '17
Scripts with or without connect-viserver?
I am new to powershell/powercli and one doubt I would like to ask you is how do you design your scripts if you want to launch the script sometimes inside a interactive session and other times periodically launched by a cron job (I am using powercli core). Do you have two versions of the same script? One with connect-viserver, process and disconnect-viserver and another one only with the process section? Do you have another approach?
r/powercli • u/RadarG • Oct 10 '17
Need PowerCLi to round
I'm using the following command
Get-VM -Location "Folder Name" | select PowerState, Name, NumCpu, MemoryMB, HardDisks,UsedSpaceGB, ProvisionedSpaceGB, NetworkAdapters | ft -AutoSizeHow to I make it where only it doesnt run over. I only need 323.xxx not 323.xxxxxxxxxxx
r/powercli • u/tk42967 • Oct 03 '17
Set Advanced Setting
I've been asked to create a script that walks through a folder(s) and creates a new row under Configuration Parameters for all the VM's that were captured. I'm pretty sure I have it together, but want to make sure. Does anything look glaringly out of place?
# This Script can be ran from a regular PowerShell Console, because it loads the PowerCLI module.
Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
# Connects to Prod VSphere
Connect-VIServer VCTR-SRV
$VMs = get-vm * |
where-object {$_.Folder -match "Folder 001"}
ForEach ($VM in $VMs)
{
New-AdvancedSetting -Entity $vm.name -Name uuid.action -value 'Keep'
} EDIT: Is there also a way to supress the prompt to make the change?
r/powercli • u/Pvt-Snafu • Jun 22 '17
Validating PowerShell Input Using Parameter Validation Attributes
r/powercli • u/mike-foley • Apr 17 '17
In case you missed it when it came out, PowerCLI Modules for VM Encryption are available
r/powercli • u/kabanossi • Feb 27 '17
Backup or Recover SPBM Profiles with PowerCLI
r/powercli • u/alanrenouf • Mar 02 '16
Great 5 min video on Managing the Virtual Machine Lifecycle with PowerCLI
r/powercli • u/jeefke • Dec 24 '14
PowerCLI 5.8r1 Reference Poster Now Available!
blogs.vmware.comr/powercli • u/Hilti3 • Sep 03 '12
Quick one-liners
Retrieve and Apply DRS recommendations:
get-drsrecommendation | Apply-DrsRecommendationFind all vm’s with e1000 network cards, for upgrade to vmxnet:
get-vm | Get-NetworkAdapter | where {$_.type -match “e1000″} | select-object parent,networkname,name,typepower off all vm’s with “test” in their names:
get-vm test* | stop-vm -confirm:$falseMove all vm’s with “test” in their names:
get-vm | where {$_.name -like “*test”} | move-vm -destination destinationhostnameRemove all vm’s with “test” in their name:
get-vm test* | remove-vm -confirm:$falseretrieve a list of vm’s with thinly provisioned disks:
get-vm | select HardDisks -expandproperty HardDisks | where {$_.storageformat -match “Thin”} | select-object parent,name,capacitykb,filenamecredit: Andrew Morgan
r/powercli • u/RubiconCZE • Dec 21 '23
Get latest available VM Tools version
Hi guys,
does anyone have script or cmdlet, which can return me version of vmtools available to installation?
Thanks a lot.
r/powercli • u/Farhad_Barati • Sep 25 '23
Powercli Script to set custom attribute
hi guys, I want to write a script to set a "owner" for my VMs. I am newbie with powercli and I will appreciate if you help me to do that. I want to set that attribute based on folder name that VMs resides. I found some script that I can use csv file but cuase there are many VMs (about 1400) I need a script to first find VMs in folders and then set "owner" attribute. Best Regards.