gpt4 book ai didi

用于在网络适配器上打开 "File and Print Sharing for Microsoft Networks"的 PowerShell 命令

转载 作者:行者123 更新时间:2023-12-05 03:57:42 41 4
gpt4 key购买 nike

是否有用于在网络适配器上打开“Microsoft 网络的文件和打印共享”的 PowerShell 命令/代码?

我找到了以下链接 How to Turn On or Off File and Printer Sharing in Windows 10显示 powershell 代码以在防火墙(选项 3)但不在网卡(选项 4)上打开“文件和打印共享”。

我发现我可以使用带有参数 /on 的文件 drfpshare.exe 来打开它。我的偏好是尽可能使用直接的 PowerShell 代码,但如果我必须使用二进制文件,我可以让它工作。

最后要注意的是,命令/代码需要使用 PowerShell 2 及更高版本。

最佳答案

尝试:

Enable-NetAdapterBinding -Name "Network Adapter Name" -DisplayName "File and Printer Sharing for Microsoft Networks"

还有:

Disable-NetAdapterBinding -Name "Network Adapter Name" -DisplayName "File and Printer Sharing for Microsoft Networks"

关于用于在网络适配器上打开 "File and Print Sharing for Microsoft Networks"的 PowerShell 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58403467/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com