hi friends
i have some servers which their hostnames adhere "Myserver+number" naming convention .
for example their exact names are:
Myserver1 , Myserver2, Myserver3
now i need a command that stores the last letter of the Hostname (which is definitely a digit), in a variable for later use.
i can get the computer name via (gwmiwin32_computersystem).name
but i don't know the rest. i don't know how to use get-content or select-string or any other cmdlets to achieve that. i tried these cmdets but no result
any help?
thanks in advanced