- Thread Author
-
- #1
I am unable to see my Windows 10 laptop from my Windows 11 Main computer in the file explorer network. I can ping it but even though I have both computers set to share without passwords I get the "Enter Network credentials". I have tried entering my user and password of the laptop but it is rejected. I can ping the WIN10 laptop from WIN 11.
Connection from the laptop TO the Main computer works fine.
Commands below run on the Main computer
On MAIN-PC 192.168.1.3 WORKGROUP HP Inc. BC:E9:2F:A4:11:3E MAIN-PC\glenn
On DELL-LAPTOP 192.168.1.71 WORKGROUP Dell Inc. 34:17:EB:82:0E:AE
ping 192.168.1.71
Pinging 192.168.1.71 with 32 bytes of data:
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Ping statistics for 192.168.1.71:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 2ms, Average = 2ms
********
Both computers have dedicated IPs
S C:\WINDOWS\system32> test-connection -ComputerName DELL-Laptop
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
Connection from the laptop TO the Main computer works fine.
Commands below run on the Main computer
On MAIN-PC 192.168.1.3 WORKGROUP HP Inc. BC:E9:2F:A4:11:3E MAIN-PC\glenn
On DELL-LAPTOP 192.168.1.71 WORKGROUP Dell Inc. 34:17:EB:82:0E:AE
ping 192.168.1.71
Pinging 192.168.1.71 with 32 bytes of data:
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Reply from 192.168.1.71: bytes=32 time=2ms TTL=128
Ping statistics for 192.168.1.71:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 2ms, Average = 2ms
********
Both computers have dedicated IPs
S C:\WINDOWS\system32> test-connection -ComputerName DELL-Laptop
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
test-connection : Testing connection to computer 'DELL-Laptop' failed: Error due to lack of resources
At line:1 char:1
+ test-connection -ComputerName DELL-Laptop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (DELL-Laptop:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
Solution
Thanks — useful detail. This is a classic SMB/credentials issue (you can ping, but SMB auth is failing). Below is a concise, practical checklist (ordered from least‑to‑most invasive) with exact commands you can run on each machine. Follow the steps, paste back any exact error text/output you get (I’ll parse it), and I’ll tell you the next surgical step.
I’ll assume:
I’ll assume:
- MAIN‑PC = Windows 11 (192.168.1.3) — that’s where you get the “Enter network credentials” prompt.
- DELL‑LAPTOP = Windows 10 (192.168.1.71) — the target share.
- Windows file sharing uses SMB + account authentication. If the client sends credentials the server won’t accept — you get “Enter network credentials” and logon...
- Thread Author
-
- #21
STILL BROKEN
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell
PS C:\WINDOWS\system32> Get-Service LanmanWorkstation | Format-List Name,Status,StartType
Name : LanmanWorkstation
Status : Running
StartType : Automatic
PS C:\WINDOWS\system32> net view \192.168.1.71
System error 1702 has occurred.
The binding handle is invalid.
PS C:\WINDOWS\system32>
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell
PS C:\WINDOWS\system32> Get-Service LanmanWorkstation | Format-List Name,Status,StartType
Name : LanmanWorkstation
Status : Running
StartType : Automatic
PS C:\WINDOWS\system32> net view \192.168.1.71
System error 1702 has occurred.
The binding handle is invalid.
PS C:\WINDOWS\system32> net use Z: \192.168.1.71\PublicShare /user:Guest "" /persistent:no
System error 67 has occurred.
The network name cannot be found.
PS C:\WINDOWS\system32>
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell
PS C:\WINDOWS\system32> Get-Service LanmanWorkstation | Format-List Name,Status,StartType
Name : LanmanWorkstation
Status : Running
StartType : Automatic
PS C:\WINDOWS\system32> net view \192.168.1.71
System error 1702 has occurred.
The binding handle is invalid.
PS C:\WINDOWS\system32>
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell
PS C:\WINDOWS\system32> Get-Service LanmanWorkstation | Format-List Name,Status,StartType
Name : LanmanWorkstation
Status : Running
StartType : Automatic
PS C:\WINDOWS\system32> net view \192.168.1.71
System error 1702 has occurred.
The binding handle is invalid.
PS C:\WINDOWS\system32> net use Z: \192.168.1.71\PublicShare /user:Guest "" /persistent:no
System error 67 has occurred.
The network name cannot be found.
PS C:\WINDOWS\system32>
- Joined
- Mar 14, 2023
- Messages
- 100,315
Thanks — this is really helpful. Two points before the next commands:
Step 1 — On MAIN‑PC: test from a true Command Prompt (not PowerShell)
1) Open a Windows Command Prompt as Administrator (Start → type cmd → right‑click → Run as administrator).
2) Run exactly:
net view \192.168.1.71
(Paste the full output here.
If that lists the shares, try mapping:
net use Z: \192.168.1.71\PublicShare /persistent:no
If it prompts for credentials, cancel the prompt and run the guest map:
net use Z: \192.168.1.71\PublicShare /user:Guest "" /persistent:no
Note: the "" is an empty password. Paste the exact output or error (do not add or remove slashes).
Step 2 — If net view still fails with an error (do this next)
Run (still in elevated cmd) to clear any old sessions and then test again:
net use * /delete /y
net view \192.168.1.71
Step 3 — If the client still shows ERROR 67 or "binding handle is invalid"
On DELL‑LAPTOP change one SMB server policy that can block anonymous/unencrypted sessions, then restart the server service. Run these on the DELL (Admin PowerShell):
Restart-Service -Name LanmanServer -Force
Then retry Step 1 (net view / net use) from MAIN‑PC.
Step 4 — If mapping still fails: capture and paste decisive outputs
If the previous steps did not make it work, please paste outputs from these (do them on MAIN‑PC unless noted):
From MAIN‑PC (Admin cmd / PowerShell):
Rather than leaving insecure guest auth enabled, the recommended approach is to create a dedicated local user on the DELL and use that from MAIN‑PC. I can paste those exact commands too (one user to create, assign NTFS + SMB rights) — this is what I would set for long‑term secure sharing.
Why I suggested toggling RejectUnencryptedAccess
Your server showed RejectUnencryptedAccess = True earlier. That prevents plain (unencrypted) SMB sessions and can block anonymous/legacy clients. Forcing it to False temporarily is a quick test to see whether that policy is causing the rejects. If that fixes the problem, we can then either:
If you run the Set-SmbServerConfiguration command to allow unencrypted access, please revert it after you finish testing/use the dedicated account workflow. I’ll remind you the revert command when needed.
Next step — please run Step 1 (the net view in an elevated cmd) and paste the output here. If it fails, run Step 3 on the DELL (the Set‑SmbServerConfiguration command) and then retry the net view from MAIN‑PC — paste both outputs and I’ll take it from there.
- I saw a few single‑backslash attempts in your logs (e.g. \192.168.1.71). That produces ERROR 67. Always use double backslashes for UNC: \192.168.1.71\ShareName.
- Your DELL side looks correctly configured (SMB listening, share created). The remaining problem is the client side failing to establish the SMB session — likely because the client is refusing the insecure anonymous session or there’s an SMB policy mismatch.
Step 1 — On MAIN‑PC: test from a true Command Prompt (not PowerShell)
1) Open a Windows Command Prompt as Administrator (Start → type cmd → right‑click → Run as administrator).
2) Run exactly:
net view \192.168.1.71
(Paste the full output here.
If that lists the shares, try mapping:
net use Z: \192.168.1.71\PublicShare /persistent:no
If it prompts for credentials, cancel the prompt and run the guest map:
net use Z: \192.168.1.71\PublicShare /user:Guest "" /persistent:no
Note: the "" is an empty password. Paste the exact output or error (do not add or remove slashes).
Step 2 — If net view still fails with an error (do this next)
Run (still in elevated cmd) to clear any old sessions and then test again:
net use * /delete /y
net view \192.168.1.71
Step 3 — If the client still shows ERROR 67 or "binding handle is invalid"
On DELL‑LAPTOP change one SMB server policy that can block anonymous/unencrypted sessions, then restart the server service. Run these on the DELL (Admin PowerShell):
Allow unencrypted access (temporarily) and restart the server
Set-SmbServerConfiguration -RejectUnencryptedAccess $false -ForceRestart-Service -Name LanmanServer -Force
Verify change
Get-SmbServerConfiguration | Format-List RejectUnencryptedAccess,NullSessionShares,AutoShareWorkstationThen retry Step 1 (net view / net use) from MAIN‑PC.
Step 4 — If mapping still fails: capture and paste decisive outputs
If the previous steps did not make it work, please paste outputs from these (do them on MAIN‑PC unless noted):
From MAIN‑PC (Admin cmd / PowerShell):
- net view \192.168.1.71
- net use Z: \192.168.1.71\PublicShare /user:Guest "" /persistent:no
- Test-NetConnection -ComputerName 192.168.1.71 -Port 445
- Get-SmbShare | Format-Table Name,Path,ScopeName
- Get-SmbServerConfiguration | Format-List RejectUnencryptedAccess,NullSessionShares,EnableSMB1Protocol,EnableSMB2Protocol
- Get-SmbSession | Format-Table -AutoSize (run this right after you attempt a connection from MAIN‑PC)
Rather than leaving insecure guest auth enabled, the recommended approach is to create a dedicated local user on the DELL and use that from MAIN‑PC. I can paste those exact commands too (one user to create, assign NTFS + SMB rights) — this is what I would set for long‑term secure sharing.
Why I suggested toggling RejectUnencryptedAccess
Your server showed RejectUnencryptedAccess = True earlier. That prevents plain (unencrypted) SMB sessions and can block anonymous/legacy clients. Forcing it to False temporarily is a quick test to see whether that policy is causing the rejects. If that fixes the problem, we can then either:
- reconfigure clients to use encrypted SMB, or
- create real user credentials so you don’t need anonymous shares.
If you run the Set-SmbServerConfiguration command to allow unencrypted access, please revert it after you finish testing/use the dedicated account workflow. I’ll remind you the revert command when needed.
Next step — please run Step 1 (the net view in an elevated cmd) and paste the output here. If it fails, run Step 3 on the DELL (the Set‑SmbServerConfiguration command) and then retry the net view from MAIN‑PC — paste both outputs and I’ll take it from there.
- Joined
- Mar 14, 2023
- Messages
- 100,315
I hear you — this has been a long grind and it’s totally understandable to be frustrated. You’ve done all the right diagnostic steps and we’ve narrowed it down: the server (DELL) has SMB up and the share exists, but the client (MAIN) keeps failing to authenticate (and anonymous/guest options are awkward and insecure). The fastest, most reliable fix that’s also secure is to create a matching local account on both PCs with the same username and password — then Windows will use your current credentials automatically and Explorer mapping will work without extra prompts.
Below I’ll give a single safe, copy/paste set of commands you can run to create a local “share” user on BOTH machines, give that user full access to the PublicShare on the DELL, test the mapping from MAIN, and then the revert (cleanup) commands when you want to remove the account. This avoids enabling insecure guest auth and avoids continued guessing about registry/policy settings.
If you prefer a different path (SFTP with WinSCP, OneDrive, USB stick, or we try more low-level SMB debugging), tell me and I’ll switch — but this matching-user approach usually solves workgroup SMB pain quickly.
IMPORTANT
Run in Admin PowerShell on DELL-LAPTOP exactly:
New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
Add-LocalGroupMember -Group "Users" -Member "shareuser"
icacls 'C:\PublicShare' /grant 'shareuser OI)(CI)F' /T | Out-Null
Grant-SmbShareAccess -Name "PublicShare" -AccountName "shareuser" -AccessRight Full -Force
Run in Admin PowerShell on MAIN‑PC exactly (enter the same password you typed at DELL when prompted):
New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Local share account"
Add-LocalGroupMember -Group "Users" -Member "shareuser"
Write-Output "Local user 'shareuser' created on MAIN. Log off and log back in as your normal user (no need to log in as shareuser)."
In an elevated Command Prompt (or normal Explorer):
net use Z: \192.168.1.71\PublicShare /persistent:no
DELL (Admin PowerShell):
Remove-SmbShare -Name "PublicShare" -Force # only if you want to remove the share
net user shareuser /delete
MAIN (Admin PowerShell):
net user shareuser /delete
If you prefer not to create accounts on both machines, alternative options:
A) to run the create-user blocks now (I’ll wait while you run them), or
B) step-by-step OpenSSH SFTP instructions instead (set up secure file sharing without SMB), or
C) I provide a one‑click script that creates the account on both machines if you give me remote execution permission (not recommended)?
If you want to proceed, say “Run DELL block now” (and after it completes say “Run MAIN block now”), then try the net use mapping and paste any result. I’ll stay with you through it.
Below I’ll give a single safe, copy/paste set of commands you can run to create a local “share” user on BOTH machines, give that user full access to the PublicShare on the DELL, test the mapping from MAIN, and then the revert (cleanup) commands when you want to remove the account. This avoids enabling insecure guest auth and avoids continued guessing about registry/policy settings.
If you prefer a different path (SFTP with WinSCP, OneDrive, USB stick, or we try more low-level SMB debugging), tell me and I’ll switch — but this matching-user approach usually solves workgroup SMB pain quickly.
IMPORTANT
- Run the DELL block on the DELL‑LAPTOP (Windows 10) as Administrator.
- Run the MAIN block on the MAIN‑PC (Windows 11) as Administrator.
- Use a reasonably strong password (example below) and replace it with your own.
Run in Admin PowerShell on DELL-LAPTOP exactly:
---- DELL (run as Admin PowerShell) ----
$pw = Read-Host -AsSecureString "Type a password for the new local share user (copy this into MAIN when prompted)"New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
Add-LocalGroupMember -Group "Users" -Member "shareuser"
Ensure PublicShare exists and has NTFS Everyone and share access
New-Item -Path 'C:\PublicShare' -ItemType Directory -Force | Out-Nullicacls 'C:\PublicShare' /grant 'shareuser
Grant-SmbShareAccess -Name "PublicShare" -AccountName "shareuser" -AccessRight Full -Force
Restart server (apply changes)
Restart-Service -Name LanmanServer -ForceShow status
Write-Output "Created user 'shareuser' and granted access to C:\PublicShare. Now run the MAIN block on MAIN-PC."---- end DELL block ----
Notes:- When you run this you’ll be prompted to enter a secure password (type it; you’ll need the same password on MAIN).
- The command creates a local user "shareuser" and gives it NTFS + SMB rights for the PublicShare.
Run in Admin PowerShell on MAIN‑PC exactly (enter the same password you typed at DELL when prompted):
---- MAIN (run as Admin PowerShell) ----
$pw = Read-Host -AsSecureString "Type the SAME password you used on DELL"New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Local share account"
Add-LocalGroupMember -Group "Users" -Member "shareuser"
Write-Output "Local user 'shareuser' created on MAIN. Log off and log back in as your normal user (no need to log in as shareuser)."
---- end MAIN block ----
Step C — Map the share from MAIN (after you run the MAIN block and stay logged in)In an elevated Command Prompt (or normal Explorer):
net use Z: \192.168.1.71\PublicShare /persistent:no
- If you created the same user on both machines AND you are logged into MAIN as a local user that matches the session credentials, Windows will try current credentials and should succeed.
- If it still prompts, enter: MAIN-PC\shareuser and the password (but it should not be necessary after matching accounts). If it fails, paste the exact error text.
- From MAIN Explorer open Z: (or \192.168.1.71\PublicShare).
- On DELL run Get-SmbSession to see the session:
Get-SmbSession | Format-Table -AutoSize
DELL (Admin PowerShell):
Remove-SmbShare -Name "PublicShare" -Force # only if you want to remove the share
or remove user and rights
icacls 'C:\PublicShare' /remove "shareuser" /Tnet user shareuser /delete
MAIN (Admin PowerShell):
net user shareuser /delete
If you prefer not to create accounts on both machines, alternative options:
- SFTP: enable OpenSSH server on the Windows 10 machine and use WinSCP from the Windows 11 machine (secure — avoids SMB issues). I can paste the simplest install & run steps for OpenSSH and WinSCP mapping.
- Use a sync/transfer tool (Resilio Sync, Syncthing) or a cloud share (OneDrive, Dropbox) — not as direct but avoids SMB headaches.
- Continue using the anonymous/guest approach we tried earlier (I’ll revert it and finish that flow) — I don’t recommend long-term.
- We already tried NullSessionShares/AllowInsecureGuestAuth etc. If those were left enabled earlier, they should have worked; since they didn’t reliably do so, it suggests a client-side policy or cached credential interfering — matching users bypasses all of that cleanly.
A) to run the create-user blocks now (I’ll wait while you run them), or
B) step-by-step OpenSSH SFTP instructions instead (set up secure file sharing without SMB), or
C) I provide a one‑click script that creates the account on both machines if you give me remote execution permission (not recommended)?
If you want to proceed, say “Run DELL block now” (and after it completes say “Run MAIN block now”), then try the net use mapping and paste any result. I’ll stay with you through it.
- Thread Author
-
- #26
FROM DELL
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell Install PowerShell on Windows, Linux, and macOS - PowerShell
PS C:\Windows\system32> $pw = Read-Host -AsSecureString "Type a password for the new local share user (copy this into MAIN when prompted)"
>> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
>> Add-LocalGroupMember -Group "Users" -Member "shareuser"$pw = Read-Host -AsSecureString "Type a password for the new local share user (copy this into MAIN when prompted)"
Type a password for the new local share user (copy this into MAIN when prompted): ********
Name Enabled Description
---- ------- -----------
shareuser True Temporary share user
Add-LocalGroupMember : A positional parameter cannot be found that accepts argument 'System.Security.SecureString'.
At line:3 char:1
+ Add-LocalGroupMember -Group "Users" -Member "shareuser"$pw = Read-Hos ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: ) [Add-LocalGroupMember], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.AddLocalGroupMemberCommand
PS C:\Windows\system32> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
New-LocalUser : User shareuser already exists.
At line:1 char:1
+ New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (shareuser:LocalUser) [New-LocalUser], UserExistsException
+ FullyQualifiedErrorId : UserExists,Microsoft.PowerShell.Commands.NewLocalUserCommand
PS C:\Windows\system32> Add-LocalGroupMember -Group "Users" -Member "shareuser"
PS C:\Windows\system32> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
>> Add-LocalGroupMember -Group "Users" -Member "shareuser"
New-LocalUser : User shareuser already exists.
At line:1 char:1
+ New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (shareuser:LocalUser) [New-LocalUser], UserExistsException
+ FullyQualifiedErrorId : UserExists,Microsoft.PowerShell.Commands.NewLocalUserCommand
Add-LocalGroupMember : DELL-LAPTOP\shareuser is already a member of group Users.
At line:2 char:1
+ Add-LocalGroupMember -Group "Users" -Member "shareuser"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (Users:String) [Add-LocalGroupMember], MemberExistsException
+ FullyQualifiedErrorId : MemberExists,Microsoft.PowerShell.Commands.AddLocalGroupMemberCommand
PS C:\Windows\system32> New-Item -Path 'C:\PublicShare' -ItemType Directory -Force | Out-Null
>> icacls 'C:\PublicShare' /grant 'shareuser OI)(CI)F' /T | Out-Null
>> Grant-SmbShareAccess -Name "PublicShare" -AccountName "shareuser" -AccessRight Full -Force
Name ScopeName AccountName AccessControlType AccessRight
---- --------- ----------- ----------------- -----------
PublicShare * Everyone Allow Full
PublicShare * DELL-LAPTOP\shareuser Allow Full
PS C:\Windows\system32> Restart-Service -Name LanmanServer -Force
PS C:\Windows\system32> Write-Output "Created user 'shareuser' and granted access to C:\PublicShare. Now run the MAIN block on MAIN-PC."
Created user 'shareuser' and granted access to C:\PublicShare. Now run the MAIN block on MAIN-PC.
PS C:\Windows\system32>
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell Install PowerShell on Windows, Linux, and macOS - PowerShell
PS C:\Windows\system32> $pw = Read-Host -AsSecureString "Type a password for the new local share user (copy this into MAIN when prompted)"
>> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
>> Add-LocalGroupMember -Group "Users" -Member "shareuser"$pw = Read-Host -AsSecureString "Type a password for the new local share user (copy this into MAIN when prompted)"
Type a password for the new local share user (copy this into MAIN when prompted): ********
Name Enabled Description
---- ------- -----------
shareuser True Temporary share user
Add-LocalGroupMember : A positional parameter cannot be found that accepts argument 'System.Security.SecureString'.
At line:3 char:1
+ Add-LocalGroupMember -Group "Users" -Member "shareuser"$pw = Read-Hos ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument:
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.AddLocalGroupMemberCommand
PS C:\Windows\system32> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
New-LocalUser : User shareuser already exists.
At line:1 char:1
+ New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (shareuser:LocalUser) [New-LocalUser], UserExistsException
+ FullyQualifiedErrorId : UserExists,Microsoft.PowerShell.Commands.NewLocalUserCommand
PS C:\Windows\system32> Add-LocalGroupMember -Group "Users" -Member "shareuser"
PS C:\Windows\system32> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
>> Add-LocalGroupMember -Group "Users" -Member "shareuser"
New-LocalUser : User shareuser already exists.
At line:1 char:1
+ New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (shareuser:LocalUser) [New-LocalUser], UserExistsException
+ FullyQualifiedErrorId : UserExists,Microsoft.PowerShell.Commands.NewLocalUserCommand
Add-LocalGroupMember : DELL-LAPTOP\shareuser is already a member of group Users.
At line:2 char:1
+ Add-LocalGroupMember -Group "Users" -Member "shareuser"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (Users:String) [Add-LocalGroupMember], MemberExistsException
+ FullyQualifiedErrorId : MemberExists,Microsoft.PowerShell.Commands.AddLocalGroupMemberCommand
PS C:\Windows\system32> New-Item -Path 'C:\PublicShare' -ItemType Directory -Force | Out-Null
>> icacls 'C:\PublicShare' /grant 'shareuser
>> Grant-SmbShareAccess -Name "PublicShare" -AccountName "shareuser" -AccessRight Full -Force
Name ScopeName AccountName AccessControlType AccessRight
---- --------- ----------- ----------------- -----------
PublicShare * Everyone Allow Full
PublicShare * DELL-LAPTOP\shareuser Allow Full
PS C:\Windows\system32> Restart-Service -Name LanmanServer -Force
PS C:\Windows\system32> Write-Output "Created user 'shareuser' and granted access to C:\PublicShare. Now run the MAIN block on MAIN-PC."
Created user 'shareuser' and granted access to C:\PublicShare. Now run the MAIN block on MAIN-PC.
PS C:\Windows\system32>
- Joined
- Mar 14, 2023
- Messages
- 100,315
Great — DELL side looks set (shareuser exists and has full access). Next run the MAIN block on your Windows‑11 PC (as Administrator). That will create the matching local user with the SAME password you typed on the DELL, then you’ll map the share.
Important: when MAIN asks for the password, type the exact same password you entered earlier on the DELL. If you don’t remember it, run the DELL commands again to set a new password and repeat the MAIN block.
Step 1 — Run this on MAIN‑PC (Admin PowerShell)
Copy/paste the entire block into an elevated PowerShell prompt on MAIN‑PC and run it. It prompts you to type the same password (securely) that you used on the DELL.
New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user" -ErrorAction SilentlyContinue
Add-LocalGroupMember -Group "Users" -Member "shareuser" -ErrorAction SilentlyContinue
Write-Output "Created/ensured local user 'shareuser' exists on MAIN‑PC."
After you create the user on MAIN, run one of these (use double backslashes exactly). If you prefer PowerShell mapping:
If that prompts for credentials, enter:
User: DELL-LAPTOP\shareuser
Password: (the same password you typed on DELL)
Or using CMD (Admin) (this will prompt for password if needed):
net use Z: \192.168.1.71\PublicShare /persistent:no
If the mapping succeeds, open Z: in Explorer.
Step 3 — Verify session on DELL
On the DELL laptop (Admin PowerShell) run:
Get-SmbSession | Format-Table -AutoSize
You should see a session entry for the MAIN‑PC and the AccountName will show DELL-LAPTOP\shareuser (or the user used).
If mapping fails — immediate checks and what to paste back
If you want to remove the temporary account later, run these:
DELL (Admin PowerShell):
net user shareuser /delete
MAIN (Admin PowerShell):
net user shareuser /delete
If you prefer a long‑term secure setup instead of temporary accounts, we can:
Important: when MAIN asks for the password, type the exact same password you entered earlier on the DELL. If you don’t remember it, run the DELL commands again to set a new password and repeat the MAIN block.
Step 1 — Run this on MAIN‑PC (Admin PowerShell)
Copy/paste the entire block into an elevated PowerShell prompt on MAIN‑PC and run it. It prompts you to type the same password (securely) that you used on the DELL.
---- MAIN‑PC (run as Administrator in PowerShell) ----
$pw = Read-Host -AsSecureString "Type the SAME password you used on DELL for 'shareuser'"New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user" -ErrorAction SilentlyContinue
Add-LocalGroupMember -Group "Users" -Member "shareuser" -ErrorAction SilentlyContinue
Write-Output "Created/ensured local user 'shareuser' exists on MAIN‑PC."
---- end MAIN block ----
Step 2 — Map the share from MAIN (Admin CMD or PowerShell)After you create the user on MAIN, run one of these (use double backslashes exactly). If you prefer PowerShell mapping:
PowerShell (Admin)
New-PSDrive -Name "Z" -PSProvider FileSystem -Root "\192.168.1.71\PublicShare" -PersistIf that prompts for credentials, enter:
User: DELL-LAPTOP\shareuser
Password: (the same password you typed on DELL)
Or using CMD (Admin) (this will prompt for password if needed):
net use Z: \192.168.1.71\PublicShare /persistent:no
If the mapping succeeds, open Z: in Explorer.
Step 3 — Verify session on DELL
On the DELL laptop (Admin PowerShell) run:
Get-SmbSession | Format-Table -AutoSize
You should see a session entry for the MAIN‑PC and the AccountName will show DELL-LAPTOP\shareuser (or the user used).
If mapping fails — immediate checks and what to paste back
- If net use or New-PSDrive fails, paste the exact error text you see.
- Run these on MAIN (Admin) and paste outputs:
Test-NetConnection -ComputerName 192.168.1.71 -Port 445
net view \192.168.1.71
Get-SmbClientConfiguration | Format-List * - On DELL (Admin) paste:
Get-SmbSession | Format-Table -AutoSize
Get-SmbShare | Format-Table Name,Path,Description,ScopeName
Get-SmbServerConfiguration | Format-List RejectUnencryptedAccess,NullSessionShares,EnableSMB2Protocol
If you want to remove the temporary account later, run these:
DELL (Admin PowerShell):
remove SMB grant if desired
Revoke-SmbShareAccess -Name "PublicShare" -AccountName "shareuser" -Forcenet user shareuser /delete
MAIN (Admin PowerShell):
net user shareuser /delete
If you prefer a long‑term secure setup instead of temporary accounts, we can:
- create a dedicated local account with a strong password and add it to a group, or
- set up OpenSSH on the DELL and use SFTP (WinSCP) for secure file transfer without SMB issues.
- Joined
- Mar 14, 2023
- Messages
- 100,315
Great — DELL side looks good: share created, shareuser exists and has full access. Next: create the same local user on MAIN‑PC (use the exact same password you typed on DELL), then map the share. I’ll give one short block to run on MAIN‑PC, plus the mapping/test commands and the cleanup commands you can use afterward.
Step 1 — Run this on MAIN‑PC (Admin PowerShell)
New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
Add-LocalGroupMember -Group "Users" -Member "shareuser"
Write-Output "Local user 'shareuser' created on MAIN‑PC. Now try mapping the share."
rem try mapping (no credentials) — it may succeed if you logged in as shareuser or if Windows auto-uses local matching creds
net use Z: \192.168.1.71\PublicShare /persistent:no
rem if above prompts or fails, map explicitly using the shareuser account:
net use Z: \192.168.1.71\PublicShare /user ELL-LAPTOP\shareuser
(remember to type the password when prompted)
On MAIN‑PC (Admin PowerShell / CMD):
If you want to remove the account & share later, run these on each machine:
DELL‑LAPTOP (Admin PowerShell):
Grant-SmbShareAccess -Name "PublicShare" -AccountName "shareuser" -AccessRight None -Force
Remove-SmbShare -Name "PublicShare" -Force # only if you want to remove the share
net user shareuser /delete
MAIN‑PC (Admin PowerShell / CMD):
net user shareuser /delete
Notes & tips
Step 1 — Run this on MAIN‑PC (Admin PowerShell)
- Open PowerShell as Administrator on MAIN‑PC, copy/paste the block, and when prompted type the SAME password you entered on the DELL laptop.
---- MAIN‑PC (run as Admin PowerShell) ----
$pw = Read-Host -AsSecureString "Type the SAME password you used on DELL"New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Temporary share user"
Add-LocalGroupMember -Group "Users" -Member "shareuser"
Write-Output "Local user 'shareuser' created on MAIN‑PC. Now try mapping the share."
---- end block ----
Step 2 — Map the share from MAIN‑PC (Admin CMD or PowerShell)- After creating the user, try mapping without specifying credentials first (Windows should use your current account if it matches). If that doesn’t work, explicitly map with the shareuser creds.
rem try mapping (no credentials) — it may succeed if you logged in as shareuser or if Windows auto-uses local matching creds
net use Z: \192.168.1.71\PublicShare /persistent:no
rem if above prompts or fails, map explicitly using the shareuser account:
net use Z: \192.168.1.71\PublicShare /user
(remember to type the password when prompted)
- If mapping succeeds, open Z: in Explorer and read/write.
On MAIN‑PC (Admin PowerShell / CMD):
- net view \192.168.1.71
- Test-NetConnection -ComputerName 192.168.1.71 -Port 445
- net use Z: \192.168.1.71\PublicShare /user
ELL-LAPTOP\shareuser (paste the exact output/error)
- Get-SmbSession | Format-Table -AutoSize
- Get-SmbShare | Format-Table Name,Path
- Get-SmbServerConfiguration | Format-List RejectUnencryptedAccess,NullSessionShares,EnableSMB2Protocol
If you want to remove the account & share later, run these on each machine:
DELL‑LAPTOP (Admin PowerShell):
Grant-SmbShareAccess -Name "PublicShare" -AccountName "shareuser" -AccessRight None -Force
Remove-SmbShare -Name "PublicShare" -Force # only if you want to remove the share
net user shareuser /delete
MAIN‑PC (Admin PowerShell / CMD):
net user shareuser /delete
Notes & tips
- Use double backslashes in UNC paths: \192.168.1.71\PublicShare (single leading backslash causes ERROR 67).
- If Explorer still prompts and rejects, try the explicit net use with /user
ELL-LAPTOP\shareuser so we see the exact error. - If you prefer not to create accounts, we can revert to allowing anonymous guest access (we tried some of that earlier) — but creating a short‑lived matching account is the most secure reliable method for workgroup SMB.
- Thread Author
-
- #29
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell
PS C:\WINDOWS\system32> $pw = Read-Host -AsSecureString "Type the SAME password you used on DELL"
Type the SAME password you used on DELL: ********
PS C:\WINDOWS\system32> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Local share account"
New-LocalUser : The term 'New-LocalUser' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" ...
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-LocalUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> Add-LocalGroupMember -Group "Users" -Member "shareuser"
Add-LocalGroupMember : The term 'Add-LocalGroupMember' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ Add-LocalGroupMember -Group "Users" -Member "shareuser"
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-LocalGroupMember:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32> Write-Output "Local user 'shareuser'
>>
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell
PS C:\WINDOWS\system32> $pw = Read-Host -AsSecureString "Type the SAME password you used on DELL"
Type the SAME password you used on DELL: ********
PS C:\WINDOWS\system32> New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" -Description "Local share account"
New-LocalUser : The term 'New-LocalUser' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ New-LocalUser -Name "shareuser" -Password $pw -FullName "Share User" ...
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-LocalUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> Add-LocalGroupMember -Group "Users" -Member "shareuser"
Add-LocalGroupMember : The term 'Add-LocalGroupMember' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ Add-LocalGroupMember -Group "Users" -Member "shareuser"
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-LocalGroupMember:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32> Write-Output "Local user 'shareuser'
>>
- Joined
- Mar 14, 2023
- Messages
- 100,315
Thanks — that error means the New‑LocalUser / Add‑LocalGroupMember cmdlets aren’t available in your PowerShell session (some systems don’t expose the Microsoft.PowerShell.LocalAccounts module to your current shell). No problem — we’ll use the classic net user / net localgroup commands from an elevated Command Prompt (works everywhere and is simpler).
Run these exact commands on MAIN‑PC (NOT PowerShell — open an elevated Command Prompt: Start → type cmd → right‑click → Run as administrator). Replace <PASSWORD> with the exact password you created on the DELL machine for shareuser (type it exactly).
1) Create the local account and add it to Users
net user shareuser <PASSWORD> /add
net localgroup Users shareuser /add
(Example if your password were P@ssw0rd123 — but use the real one you used on the DELL:
net user shareuser P@ssw0rd123 /add
net localgroup Users shareuser /add)
2) Map the share explicitly using that account
net use Z: \192.168.1.71\PublicShare /user ELL-LAPTOP\shareuser <PASSWORD>
On the DELL (Admin PowerShell), run:
Get-SmbSession | Format-Table -AutoSize
You should see an entry for the MAIN‑PC session and the AccountName shareuser.
4) Cleanup (when you no longer need the account)
On MAIN (Admin CMD):
net user shareuser /delete
On DELL (Admin CMD or PowerShell):
net user shareuser /delete
rmdir /s /q C:\PublicShare
If the net user/map commands return an error, copy & paste the exact text here. Common issues and fixes:
Shall we proceed with the net user commands now? If yes, run them and paste the net use mapping output (or tell me the error text) and I’ll read it immediately.
Run these exact commands on MAIN‑PC (NOT PowerShell — open an elevated Command Prompt: Start → type cmd → right‑click → Run as administrator). Replace <PASSWORD> with the exact password you created on the DELL machine for shareuser (type it exactly).
1) Create the local account and add it to Users
net user shareuser <PASSWORD> /add
net localgroup Users shareuser /add
(Example if your password were P@ssw0rd123 — but use the real one you used on the DELL:
net user shareuser P@ssw0rd123 /add
net localgroup Users shareuser /add)
2) Map the share explicitly using that account
net use Z: \192.168.1.71\PublicShare /user
- If mapping succeeds you’ll see “The command completed successfully.” Open Z: in Explorer and test file create/delete.
- If it prompts for a password, type the same <PASSWORD> and press Enter.
On the DELL (Admin PowerShell), run:
Get-SmbSession | Format-Table -AutoSize
You should see an entry for the MAIN‑PC session and the AccountName shareuser.
4) Cleanup (when you no longer need the account)
On MAIN (Admin CMD):
net user shareuser /delete
On DELL (Admin CMD or PowerShell):
net user shareuser /delete
If you want to remove the share too:
Remove-SmbShare -Name "PublicShare" -Forcermdir /s /q C:\PublicShare
If the net user/map commands return an error, copy & paste the exact text here. Common issues and fixes:
- If net user reports “The password does not meet the password policy requirements”, pick a password that satisfies complexity (upper, lower, digit, symbol) or temporarily relax local policy (I can show that).
- If net use returns ERROR 67 again, double‑check you used two backslashes in the UNC (\192.168.1.71\PublicShare) and run Test‑NetConnection -ComputerName 192.168.1.71 -Port 445 (you already did that and it was OK).
- If mapping returns “Access is denied” then either the password is wrong or the DELL share ACL isn’t correct (we already granted shareuser full access on DELL).
- net user shareuser (on MAIN or DELL after creation) and
- the exact net use output/error after you try the mapping.
Shall we proceed with the net user commands now? If yes, run them and paste the net use mapping output (or tell me the error text) and I’ll read it immediately.
- Thread Author
-
- #31
Microsoft Windows [Version 10.0.26100.4946]
(c) Microsoft Corporation. All rights reserved.
Clink v0.4.9 [git:2fd2c2] Copyright (c) 2012-2016 Martin Ridgers
D:\Reference\Windows & Brave Tips\Network>net user shareuser <PASSWORD> /add
The system cannot find the file specified.
D:\Reference\Windows & Brave Tips\Network>net localgroup Users shareuser /add
There is no such global user or group: shareuser.
More help is available by typing NET HELPMSG 3783.
D:\Reference\Windows & Brave Tips\Network>
(c) Microsoft Corporation. All rights reserved.
Clink v0.4.9 [git:2fd2c2] Copyright (c) 2012-2016 Martin Ridgers
D:\Reference\Windows & Brave Tips\Network>net user shareuser <PASSWORD> /add
The system cannot find the file specified.
D:\Reference\Windows & Brave Tips\Network>net localgroup Users shareuser /add
There is no such global user or group: shareuser.
More help is available by typing NET HELPMSG 3783.
D:\Reference\Windows & Brave Tips\Network>
- Joined
- Mar 14, 2023
- Messages
- 100,315
Thanks — that error happened because you literally typed <PASSWORD> (angle brackets) instead of giving a real password, so net tried to find a file named <PASSWORD>. No problem — easy fix.
Do this (step‑by‑step — copy/paste each command)
1) Open an elevated Command Prompt on MAIN‑PC
At the elevated prompt run:
net user shareuser * /add
You’ll get prompted twice:
Type a password for the user:
Retype the password to confirm:
net localgroup Users shareuser /add
4) Verify the user exists:
net user shareuser
You should see the user account details.
5) Map the share using that account (still in elevated cmd)
Run:
net use Z: \192.168.1.71\PublicShare /user ELL-LAPTOP\shareuser
When prompted type the same password you entered in step 2. If it succeeds you’ll see “The command completed successfully.” Open Z: in Explorer.
6) If it fails, paste the exact error text here. Also run these two checks and paste outputs:
If net user reports the account could not be created because of password policy, choose a stronger password (mix of upper/lower/digits/symbol) or check the password policy with:
net accounts
7) Cleanup when finished (on both machines)
When you no longer want the temporary user:
Try steps 2–5 now and paste the exact output from the net use command (or the net view/Test-NetConnection outputs) if it still fails — I’ll read it right away and give the next targeted step.
Do this (step‑by‑step — copy/paste each command)
1) Open an elevated Command Prompt on MAIN‑PC
- Start → type cmd → right‑click “Command Prompt” → Run as administrator
At the elevated prompt run:
net user shareuser * /add
You’ll get prompted twice:
Type a password for the user:
Retype the password to confirm:
- Enter exactly the same password you used on the DELL when creating the DELL shareuser (the password is hidden as you type). Using the interactive form (*) avoids problems with special characters and quoting.
net localgroup Users shareuser /add
4) Verify the user exists:
net user shareuser
You should see the user account details.
5) Map the share using that account (still in elevated cmd)
Run:
net use Z: \192.168.1.71\PublicShare /user
When prompted type the same password you entered in step 2. If it succeeds you’ll see “The command completed successfully.” Open Z: in Explorer.
6) If it fails, paste the exact error text here. Also run these two checks and paste outputs:
- net view \192.168.1.71
- Test-NetConnection -ComputerName 192.168.1.71 -Port 445
If net user reports the account could not be created because of password policy, choose a stronger password (mix of upper/lower/digits/symbol) or check the password policy with:
net accounts
7) Cleanup when finished (on both machines)
When you no longer want the temporary user:
- On MAIN: net user shareuser /delete
- On DELL: net user shareuser /delete
Try steps 2–5 now and paste the exact output from the net use command (or the net view/Test-NetConnection outputs) if it still fails — I’ll read it right away and give the next targeted step.
- Joined
- Mar 14, 2023
- Messages
- 100,315
Awesome — great job, Glenn! Really glad to hear Z: worked and you can copy files.
A few quick, safe next steps and cleanup recommendations so your network stays usable and secure.
1) Short tidy-up (optional — run on each machine when you’re ready)
A few quick, safe next steps and cleanup recommendations so your network stays usable and secure.
1) Short tidy-up (optional — run on each machine when you’re ready)
- If you only created the temporary share/user to get files across and don’t need them any more, remove them.
- Disconnect the mapped drive:
net use Z: /delete - Delete the temporary local user:
net user shareuser /delete - If you set AllowInsecureGuestAuth earlier and want to disable it (recommended):
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v AllowInsecureGuestAuth /t REG_DWORD /d 0 /f
Restart-Service -Name LanmanWorkstation -Force
- Remove SMB share (if you want to remove it):
Remove-SmbShare -Name "PublicShare" -Force - Remove the folder (optional):
Remove-Item -Path "C:\PublicShare" -Recurse -Force - Delete the temporary local user:
net user shareuser /delete - Remove PublicShare from NullSessionShares if you added it earlier (PowerShell):
$regPath = 'HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters'
$current = (Get-ItemProperty -Path $regPath -Name NullSessionShares -ErrorAction SilentlyContinue).NullSessionShares
if ($current) {
$arr = @($current) | Where-Object { $_ -ne 'PublicShare' }
if ($arr.Length -gt 0) { Set-ItemProperty -Path $regPath -Name NullSessionShares -Value $arr } else { Remove-ItemProperty -Path $regPath -Name NullSessionShares -ErrorAction SilentlyContinue }
}
Restart-Service -Name LanmanServer -Force
- Create a permanent local account on the file‑server (DELL) with a good password and grant that account only the permissions needed on the share (no admin rights). On MAIN just map the share once with those credentials and save them in Credential Manager — no registry changes, no guest access enabled.
- I can give the exact commands to create that account and assign NTFS+share permissions if you want.
- Convenience: keep the temporary share + user until you’re done copying and then remove them.
- Security: remove the temporary items and use the matching local account approach for ongoing shares.
- On server (DELL): view sessions and shares:
Get-SmbSession | Format-Table -AutoSize
Get-SmbShare | Format-Table Name,Path - On client (MAIN): check mapped drives:
net use
- Remove the temporary accounts & shares now? (I can paste the exact commands to copy/paste.
- Convert to a permanent local share user with limited rights?
- Set up SFTP (OpenSSH) or a sync tool instead of SMB?
- Make a persistent mapped drive for convenience (net use Z: \192.168.1.71\PublicShare /persistent:yes) and save credentials in Windows Credential Manager?
- Joined
- Mar 14, 2023
- Messages
- 100,315
Great — here’s a clear, safe, step‑by‑step you can copy/paste or follow in the GUI to create a persistent mapped drive Z: to \192.168.1.71\PublicShare and save credentials so you won’t be prompted again.
Important notes before you start
1) Save credentials in Credential Manager first (recommended)
A — Save credentials using cmdkey (run in a normal user command prompt; not necessarily elevated)
Open a regular Command Prompt (not elevated is okay for per-user):
cmdkey /add:192.168.1.71 /user ELL-LAPTOP\shareuser /pass:YourPasswordHere
B — Create the persistent mapping (run in regular user session)
net use Z: \192.168.1.71\PublicShare /persistent:yes
If you prefer PowerShell and want a persistent mapping:
$sec = Read-Host -AsSecureString "Password for DELL-LAPTOP\shareuser"
$cred = New-Object System.Management.Automation.PSCredential("DELL-LAPTOP\shareuser",$sec)
New-PSDrive -Name Z -PSProvider FileSystem -Root "\192.168.1.71\PublicShare" -Credential $cred -Persist
(You will be prompted for the password; this creates a Windows persistent mapping.
Troubleshooting tips if mapping still prompts / fails
Important notes before you start
- Use double backslashes for UNC paths: \192.168.1.71\PublicShare
- Persistent mappings are stored per user. Create the mapping while signed in as the user who will use it (don’t create it from an elevated Admin prompt if you want it available in your normal session).
- For saved credential storage we’ll use Windows Credential Manager (or cmdkey). Keep the password secure — remove it when you no longer need it.
1) Save credentials in Credential Manager first (recommended)
- Control Panel → Credential Manager → Windows Credentials → Add a Windows credential
- Internet or network address: 192.168.1.71
- Username: DELL-LAPTOP\shareuser
- Password: (the password you set)
- Click OK
- Open File Explorer → This PC → Map network drive (top ribbon)
- Drive: Z:
- Folder: \192.168.1.71\PublicShare
- Check: Reconnect at sign‑in
- Check: Connect using different credentials (optional; you can leave unchecked if you already stored credentials)
- Click Finish
- If prompted for credentials, enter DELL‑LAPTOP\shareuser and the password and check “Remember my credentials” (if shown).
- Reboot or sign out/in and confirm Z: reconnects automatically.
A — Save credentials using cmdkey (run in a normal user command prompt; not necessarily elevated)
Open a regular Command Prompt (not elevated is okay for per-user):
cmdkey /add:192.168.1.71 /user
B — Create the persistent mapping (run in regular user session)
net use Z: \192.168.1.71\PublicShare /persistent:yes
- If the mapping succeeds you’ll see “The command completed successfully.”
- If you get prompted for a password, enter it (the cmdkey step should avoid that).
- Remove mapping:
net use Z: /delete - Remove stored credential:
cmdkey /delete:192.168.1.71
If you prefer PowerShell and want a persistent mapping:
$sec = Read-Host -AsSecureString "Password for DELL-LAPTOP\shareuser"
$cred = New-Object System.Management.Automation.PSCredential("DELL-LAPTOP\shareuser",$sec)
New-PSDrive -Name Z -PSProvider FileSystem -Root "\192.168.1.71\PublicShare" -Credential $cred -Persist
(You will be prompted for the password; this creates a Windows persistent mapping.
Troubleshooting tips if mapping still prompts / fails
- Always use the IP (192.168.1.71) if name resolution is flaky. If you use a hostname, the saved credential must match the hostname you used.
- If you see "System error 67" — ensure you use double backslashes and that the server is reachable (Test‑NetConnection -ComputerName 192.168.1.71 -Port 445 should report TcpTestSucceeded = True).
- If you still get access denied, check the DELL share ACLs: on DELL run (Admin PowerShell) Get-SmbShareAccess -Name "PublicShare" and icacls "C:\PublicShare" to confirm shareuser has rights.
- If mapping was created while running elevated and you don’t see it in your normal session, delete and recreate the mapping in a normal (non-elevated) session — per‑user mappings are not shared between admin/non‑admin tokens.
- Use a dedicated local account (shareuser) with a strong password (you already used that).
- If you stopped Guest / anonymous settings earlier, leave them disabled.
- Remove the temporary share/user when you no longer need it:
- DELL: net user shareuser /delete
- MAIN: net user shareuser /delete
- Remove share: Remove-SmbShare -Name "PublicShare" -Force (on DELL)
- Remove saved credential: cmdkey /delete:192.168.1.71 (on MAIN)
- Paste the exact cmdkey + net use lines filled with the share/user you used so you can copy/paste now?
- Or guide you through removing the temporary share/user and setting up a permanent dedicated account & share (more secure long term)?
- Joined
- Mar 14, 2023
- Messages
- 100,315
Fantastic — really glad it’s all working, Glenn. Nice job seeing it through!
A few quick, useful cleanup and hardening steps now that you’ve confirmed everything:
1) Remove the temporary account & share (DELL — Admin PowerShell)
If anything else pops up, ping me and we’ll sort it.
A few quick, useful cleanup and hardening steps now that you’ve confirmed everything:
1) Remove the temporary account & share (DELL — Admin PowerShell)
- Remove the SMB share and folder (if you created them just for testing):
Remove-SmbShare -Name "PublicShare" -Force
Remove-Item -Path "C:\PublicShare" -Recurse -Force - Delete the temporary account:
net user shareuser /delete
- Remove the persistent mapping:
net use Z: /delete - Remove saved credential:
cmdkey /delete:192.168.1.71
- If you enabled AllowInsecureGuestAuth earlier, turn it off:
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v AllowInsecureGuestAuth /t REG_DWORD /d 0 /f
Restart-Service -Name LanmanWorkstation -Force
- On DELL: Get-SmbShare / Get-SmbServerConfiguration
- On MAIN: net use /persistent:no and Test-NetConnection -ComputerName 192.168.1.71 -Port 445
- Create a fresh Clonezilla or Macrium Reflect image while the systems are known‑good.
- Paste a single “cleanup” script with the exact commands for both machines so you can run it and be done, or
- Walk you through creating a proper permanent share with a dedicated local account & saved credential (secure long‑term), or
- Walk you through setting up OpenSSH/SFTP as an alternative.
If anything else pops up, ping me and we’ll sort it.
- Joined
- Mar 14, 2023
- Messages
- 100,315
Fantastic — great work finishing the cleanup, and glad everything is back to normal.
If you want, I can help with any of these next tasks — tell me which you prefer and I’ll do it:
If you want, I can help with any of these next tasks — tell me which you prefer and I’ll do it:
- Review the uploaded files/logs you mentioned (I can scan them and highlight anything suspicious).
- Create a short, one‑page “what I changed / how to undo” checklist you can save.
- Build a small cleanup script (PowerShell) that reverts everything we changed (temporary users, shares, registry flags) — one command to run on each machine.
- Show how to create a persistent, secure mapped drive and store credentials safely (I can paste the exact commands again).
- Set up OpenSSH (SFTP) on the Windows 10 laptop and show how to use WinSCP from the Windows 11 PC (secure alternative to SMB).
- Walk through making a full system image (Clonezilla or Macrium) step‑by‑step.
Similar threads
- Replies
- 2
- Views
- 3K
- Solved
- Replies
- 1
- Views
- 1K
- Solved
- Replies
- 4
- Views
- 2K
- Solved
- Replies
- 3
- Views
- 3K
- Solved
Windows 10
setting up new pc - can't connect to network
- Replies
- 13
- Views
- 2K