3

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?

Bogdan Bogdanov
  • 1,707
  • 2
  • 20
  • 31
Rohith Shetty
  • 31
  • 1
  • 3

1 Answers1

3

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

CodeAlchemist
  • 490
  • 5
  • 8