Forum Discussion

rmerritt's avatar
rmerritt
Copper Contributor
Jan 15, 2026

extract a string from this @{Name=WEBHOST001-OI3w}

Hi All I just want to be able to get the value

WEBHOST001-OI3w

from 

@{Name=WEBHOST001-OI3w}

 

the variable storing it is called 

$vcentername

3 Replies

  • rmerritt's avatar
    rmerritt
    Copper Contributor

    hmmm that doesnt seem to be an option here is what I see

    PS G:\merrr1\scripts> $vcentername
    WEBHOST001-OI3w

    PS G:\merrr1\scripts> $vcentername.name

    PS G:\merrr1\scripts> $vcentername.GetType()

    IsPublic IsSerial Name                                     BaseType                                                                                                       
    -------- -------- ----                                     --------                                                                                                       
    True     True     String                                   System.Object                                                                                                  

     

Resources