Azure / Azure/azure-functions-powershell-worker

Modifying TrustedHosts

Open
#359 24 comments 0 reactions 1 assignee Claimed by @eamonoreilly View on GitHub
Dominant language
C#
Stars
215
Forks
61
Avg merge
21h 4m
Merged PRs (30d)
6

Description

Scenario: An Azure Function connected to a VNet have access to on-premises Windows servers it needs to remote into.

To accomplish this, we would need to add the names/IP addresses of the target machines to the TrustedHosts property in the WSMan configuration.

I tried this from an Azure Function:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value *

Which resulted in this error:
ERROR: Set-Item : Service WinRM was not found on computer '.'.
At D:\home\site\wwwroot\HttpTrigger2\run.ps1:16 char:1

Is WinRM-based remoting not supported from Azure Functions?
What is the recommended approach in this scenario? Leverage Azure Automation instead?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.