I'm running CTP3 and it does exist by I can't get it to work. For example,
I'm running it on a local PC named CAR01 and I want to change it to CAR05.
I run (from the Integrated Scripting Environmnet):
Rename-Computer -newcomputername CAR05 -PassThru -verbose
And it gives me the error:
This command cannot be executed on target computer('localhost') due to the
following error: The RPC server is unavailable.
I checked and the RPC service is running on the PC that I'm running the
command on. I can ping localhost. Also I tried with the firewall on and off
and it made no difference. It seems like there might be some kind of issue
with the credentials or powershell having permission to do a "remote"
procedure call even though it's running on the local computer.
"Shay Levy [MVP]" wrote:
> Rename-Computer doesn't exist anymore on CTP3, I wonder why.
>
>
> ---
> Shay Levy
> Windows PowerShell MVP
> http://blogs.microsoft.co.il/blogs/ScriptFanatic
> PowerShell Toolbar: http://tinyurl.com/PSToolbar
>
>
>
> V> For PowerShell 1.0 you can use:
> V> 1) netdom.exe utility
> V> 2) Rename method in Win32_ComputerSystem WMI class
> V> For PowerShell V2 you can use Rename-Computer cmdlet.
> V> "Shane Wealti" <ShaneWealti@xxxxxx> rakst?ja
> V> zi?ojum? "news:84C94186-C2AD-430A-9E6D-0B4EF0780D2D@xxxxxx"...
> V>
> >> I'm new to Windows PowerShell so I apologize if I missed something
> >> obvious. I
> >> would like to write a script that will change the MachineName and
> >> then
> >> reboot
> >> the PC. I think I can figure out the reboot part but I searched many
> >> places
> >> and I can't figure out how to change the MachineName. I'm trying to
> >> set
> >> up a
> >> generic VM that will be used to test different configurations of
> >> software
> >> and
> >> part of the testing requires different machine names so I would like
> >> to
> >> write
> >> a script that sets up the VM with the test environment which includes
> >> a
> >> specific machine name and then reboots the PC/VM. >
>
>