How to regenerate random computer name in Win10 and Win11?

STF413 1 Reputation point
2025-08-20T12:39:36.9433333+00:00

Hello,

It is clear that there is an internal program/process in Windows to generate a random name to newly installed computers/servers.

Not wanting to reinvent the wheel, could someone tell me how to trigger that program/process again to make Win10 and/or Win11 regenerate a new random name please?

I do NOT want any PowerShell script or any long program. As I have written, I do NOT like to reinvent the wheel. There must be a command or a way to regenerate a new random computer name.

I have read the following documentation and seen the "asterisk" thing in the computer name:

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc749460(v=ws.10)

But I have no idea where I'm supposed to put the asterisk (*). I have tried it in GUI, ie Settings > System > About > Rename this computer button. This do not work.

I have tried in PowerShell command:

Rename-Computer "" -Restart

and

Rename-Computer "*" -Restart

None of them works.

So, I'm pretty clueless.

Thanks in advance to anyone who could shed light on this "mystery".

Windows for business | Windows Client for IT Pros | Devices and deployment | Set up, install, or upgrade
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Darrell Gorter 2,811 Reputation points
    2025-08-20T14:54:44.3733333+00:00

    Hello,

    You put the * in the unattended file for the computername field so that the name is generated during installation.

    Computername=*

    Darrell

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.