I do not think that in this case you will be able to avoid regular expressions.
I would use this template:
'Some text \\computername\admin$' -replace '\\\\(\w+)\\(\w+)\$', '$1'
which gives you
PS C:\> 'Some text \\computername\admin$' -replace '\\\\(\w+)\\(\w+)\$', '$1' Some text computername
or if you want to get only computer_name from a string:
'Some text \\computername\admin$' -replace '.*\\\\(\w+)\\(\w+)\$', '$1'
which returns
PS C:\> 'Some text \\computername\admin$' -replace '.*\\\\(\w+)\\(\w+)\$', '$1' computername
source share