Link to home
Start Free TrialLog in
Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

powershell switch statement

Hi Guys,

I am constructing a switch argument in powershell and how do I get the "lndapp01" on the name variable?


switch ($vm)
    {
        "LNDAPP01" {

$name=
$computerName = Get-WmiObject Win32_ComputerSystem
$computername.rename("$name")

}

thank you in advance,
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kelly Garcia

ASKER

ohh ok thanks