Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is netshell equivalent command in Powershell for Reserving Url?

In netshell we use something like this:

http add urlacl url=https://+:{0}/ user={1}

I need equivalent functionality to be achieved in Powershell or any tool other than netsh.

Can you give me direction?

like image 814
Rohith Shetty Avatar asked Dec 08 '25 00:12

Rohith Shetty


1 Answers

You can simply tell Powershell to execute the command directly from PS by running the command as follows:

$port=9080
$domainUser="Everyone"
& netsh http add urlacl url=https://+:$port/ user=$domainUser

The & (ampersand) is a call operator that will tell Powershell to execute the netsh command

Otherwise if for whatever reason netshell is not available on the target machine, you can use

Httpcfg.exe tool

to configure http and https: https://msdn.microsoft.com/en-us/library/ms733768(v=vs.110).aspx

like image 94
CodeAlchemist Avatar answered Dec 10 '25 12:12

CodeAlchemist