VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Add value to custom columns

Hi,

Need help with adding fixed value to custom column, I am able to create a blank column with below

Get-Folder DEV | get-vm | Select Name, @{N='VMState';E={$null}}

But I would like to add a value to fixed value to custom column, please help

Example : Get-Folder DEV | get-vm | Select Name, @{N='VMState';E={Permanent}}

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can use a constant value (string, int...) in the Expression part of a calculated expression.

Something like this

Get-Folder DEV | Get-VM | Select Name, @{N = 'VMState'; E = { 'Permanent' } }


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You can use a constant value (string, int...) in the Expression part of a calculated expression.

Something like this

Get-Folder DEV | Get-VM | Select Name, @{N = 'VMState'; E = { 'Permanent' } }


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Cool...Thank you very much Smiley Happy

0 Kudos