WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / Quick Tip - Retrieving the vSAN Rekey Interval using PowerCLI

Quick Tip - Retrieving the vSAN Rekey Interval using PowerCLI

07.26.2023 by William Lam // Leave a Comment

Since the release of vSAN 6.5.1, the PowerCLI team has introduced a number of high level vSAN cmdlets (current list HERE) that can be used to automate a variety of tasks. While the existing vSAN cmdlets are quite extensive and continues to get updated with new functionality, it will never be able to cover the rich set of functionality that is provided by vSAN.

For functionality that is not available in the high level vSAN cmdlets, user can still perform the task using PowerCLI, but they will need to directly access the underlying API, in this case the vSAN Management API.

Note: This concept also applies to other high level PowerCLI cmdlets, if you are unable to locate the functionality, then most likely you will need to interrogate the API using PowerCLI.


In the case of retrieving the vSAN Data-in-transit encryption rekey interval, which is not available in the high level Get-VsanClusterConfiguration cmdlet, we can easily retrieve it with the following PowerCLI snippet:

$vsanClusterName = "Supermicro-Cluster" 

$vsanCluster = Get-Cluster -Name $vsanClusterName 
$vsanVCCS = Get-VsanView -Id "VsanVcClusterConfigSystem-vsan-cluster-config-system" 
$vsanConfig = $vsanVCCS.VsanClusterGetConfig($vsanCluster.ExtensionData.MoRef) 

$vsanConfig.DataInTransitEncryptionConfig.RekeyInterval

The DataInTransitEncryptionConfig property contains two fields: enabled and rekeyInterval, the latter being what we are interested in. If you have enabled data-in-transit encryption, the rekey interval is defined in minutes with the default being 1440 (24hrs) and the minimum value is 30 (30 minutes) with maximum of 10080 (7 days).

More from my site

  • Retrieving detailed per-VM space utilization on VSAN
  • Translating vSAN VM Object IDs (UUID to VM and VM to UUID)
  • Reporting vSAN Object distribution across vSAN Disk Groups using PowerCLI
  • How to convert vSAN RVC commands into PowerCLI and/or other vSphere SDKs?
  • How to move vSAN Datastore into a Folder?

Categories // Automation, PowerCLI, VSAN Tags // PowerCLI, rekey, VSAN

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC) across Private, Hybrid and Public Cloud

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • ESXi on Lenovo ThinkStation P3 Ultra 09/29/2023
  • Quick Tip - vSphere 7.0 Update 3o also supports disabling/enabling vSphere Cluster Services (vCLS) in vSphere UI 09/29/2023
  • Heads Up - New image identifier required by VM Service in vSphere 8.0 Update 2 09/27/2023
  • How to setup private GitLab on a Synology for Project Keswick? 09/26/2023
  • ESXi on SimplyNUC Moonstone 09/25/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...