question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PS 7.1.3 and SMBv1/SMBv2 detection and disabling commands blocks PS

See original GitHub issue

Hi folks,

based on How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows. Please see my testings:

## Steps to reproduce
SMBv1 detection:
1. Start PS 7.1.3 as admin
2. Run Get-WindowsOptionalFeature -Online -FeatureName smb1protocol  
**Result: PS blocked**

SMBv1 disabling:
1. Start PS 7.1.3 as admin
2. Run Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol 
**Result: PS blocked**

SMBv2 detection:
1. Start PS 7.1.3 as admin
2. Run Get-WindowsOptionalFeature -Online -FeatureName smb2protocol  
**Result:    EnableSMB2Protocol: true ** (fast and PS does not blocks)

SMBv2 disabling:
1. Start PS 7.1.3 as admin
2. Run Disable-WindowsOptionalFeature -Online -FeatureName smb2protocol 
**Result: PS blocked**

SMBv3 detection:
1. Start PS 7.1.3 as admin
2. Run Get-WindowsOptionalFeature -Online -FeatureName smb3protocol  
**Result:    EnableSMB2Protocol: blank message ** (fast without blocked)

Expected behavior

  1. SMBv1 detection: Some message describing if protocol is installed or not as fast as possible.
  2. SMBv1 disabling: Some message describing if protocol has been disabled as fast as possible.
  3. SMBv2 detection: seems OK
  4. SMBv2 disabling: Some message describing if protocol has been disabled as fast as possible.
  5. SMBv3 detection: Some message describing if protocol is installed or not as fast as possible.

Actual behavior

PS is blecked and must be close by X close windows button


## Environment data

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JosepBalaguecommented, Jun 19, 2021

What do you mean by blocked, what’s the actual error you get back or does it just not do anything and seems like it never runs?

I am referring I cannot break the execution of the command with CTRL+Break and I have to close PS using X button on top right of the PS window

0reactions
StevenBucher98commented, May 23, 2022

Hi @jmroyb is this still an issue with the latest version of PowerShell? I am unable to reproduce.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to detect, enable and disable SMBv1, SMBv2, and ...
Here are the steps to detect, disable and enable SMBv1 client and server by using PowerShell commands with elevation. Note. The computer will ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found