通过 Intune/365 远程打开 PowerShell?

通过 Intune/365 远程打开 PowerShell?

我工作的组织拥有各种不同的设备,主要是笔记本电脑、Surface Go 和 Surface Pro。我们有许多设备需要在我们的站点进行物理定位,以便进行维修和审计。这些设备分布在整个社区的住宅中,我们希望能够轻松地物理定位这些设备,但它们都没有 GPS。我认为定位这些设备的最简单方法是将房屋中接入点的 SSID 重命名为与房屋关联的唯一名称,然后运行netsh wlan show interfaces以显示 SSID,希望这能让我们轻松找出设备位于哪个房屋中。

有没有简单的方法可以通过 Microsoft Intune 或类似程序远程运行 PowerShell?任何帮助或其他建议都非常感谢。

短暂性脑缺血发作

更新

我已经winrm quickconfig在测试客户端上运行了Enter-PSSession HOSTNAME

我现在在 PowerShell 中收到以下错误...

PS C:\windows\system32> Enter-PSSession -TAM-5235 Enter-PSSession : A parameter cannot be found that matches parameter name 'TAM-5235'. At line:1 char:17 + Enter-PSSession -TAM-5235 + ~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Enter-PSSession], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.EnterPSSessionCommand

PS C:\windows\system32> Enter-PSSession TAM-5235 Enter-PSSession : Connecting to remote server TAM-5235 failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic. At line:1 char:1

  • Enter-PSSession TAM-5235
  •   + CategoryInfo          : InvalidArgument: (TAM-5235:String) [Enter-PSSession], PSRemotingTransportException
      + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
    
    

PS C:\windows\system32>

目前正在查看使用 PowerShell 中的 WinRM 连接到远程服务器失败以获取帮助。

看来我需要在客户端上探索受信任的主机

答案1

看来我可以简单地使用 Endpoint Manager 中的设备诊断并查看wlan-report-latest.htmlSSID,然后按照我想要的方式定位设备!

尝试使用 CLI 真是浪费时间!

相关内容