I am trying to call the Rename method on the Win32_ComputerSytem class using Invoke-WMI method. Using this syntax works fine
(gwmi win32_ComputerSystem).Rename("NEWNAME")
This also works fine for demo purposes
Invoke-WmiMethod -path win32_process -Name create -ArgumentList notepad
However, when i try the following, I get an error
11 > Invoke-WmiMethod -path win32_computersystem -Name Rename -ArgumentList IwasRenamed
Invoke-WmiMethod : Invalid method Parameter(s)
At line:1 char:17
+ Invoke-WmiMethod <<<< -path win32_computersystem -Name Rename -ArgumentList IwasRenamed
+ CategoryInfo : InvalidOperation: (:) [Invoke-WmiMethod], ManagementExcepti
on
+ FullyQualifiedErrorId : InvokeWMIManagementException,Microsoft.PowerShell.Commands.
InvokeWmiMethod
What am I missing?