Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell rename computer error missing ')' method call.

$
0
0

I have this powershell command to rename a computer name based on the 2 variables I set. But when I try to execute, it throws an error,  missing ')' in method call.

(Get-WmiObject win32_computersystem).rename($n1$n2).  I tried ('newname') and it works, but wont work with variable. btw, this is a domain joined computer.



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>