Is there PowerShell command/code to turn on "File and Print Sharing for Microsoft Networks" on a network adapter?
I found the following link How to Turn On or Off File and Printer Sharing in Windows 10 that shows powershell code to turn on "File and Print Sharing" at the firewall (Option 3) but not at the network card (Option 4).
I have found that I can use the file drfpshare.exe with the argument /on to turn it on. My preference would be to use straight PowerShell code if possible but if I must use a binary I can make it work.
And the last caveat, the command/code needs to work with PowerShell 2 and above.
Try:
Enable-NetAdapterBinding -Name "Network Adapter Name" -DisplayName "File and Printer Sharing for Microsoft Networks"
There is also:
Disable-NetAdapterBinding -Name "Network Adapter Name" -DisplayName "File and Printer Sharing for Microsoft Networks"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With