Hello,
How do i remove the White space at the begining or end of variable value,
for ex:
I use .csv to have the vmnames and other values. i want to make sure that before passing the $vmname to Powecli Comdlets the spaces if any should be truncated.
any pointers?
Thanks,Govinda.
You can use the Trim, TrimStart and TrimEnd methods.
For example
$t = " abc"
$t.TrimStart(' ')
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can use the Trim, TrimStart and TrimEnd methods.
For example
$t = " abc"
$t.TrimStart(' ')
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you Luc, Thats perfect !! works Awesome.