Ramzy Abourafeh
Ramzy Abourafeh

Reputation: 1195

script to generate the machine name

I want to generate a JSON file with the name of the machine like the following:

{
  "machineName": "Machine-Name98"
}

How can I start with this? Is there any site or example to do that?

Thanks.

Upvotes: 0

Views: 68

Answers (1)

mordecai
mordecai

Reputation: 71

Try out this simple code:

Echo %computername%>json

Hope it helps

Upvotes: 1

Related Questions