How to fix New-SmbGlobalMapping : A specified logon session does not exist. It may already have been terminated.

Ferariu Armand Iulian 10 Reputation points
2023-03-27T21:07:42.3+00:00

Hi there,

I'm trying to map an azure storage account to a server which is not in domain, when I'm using the below command.:

$cred = Get-credential

New-SmbGlobalMapping -remotepath "\storageaccountname.file.core.windows.net\folder1" -Credential $cred -LocalPath T: -FullAccess @( "server\username") -Persistent $true

I receive below error:

New-SmbGlobalMapping : No mapping between account names and security IDs was done.
FullyQualifiedErrorId : Windows System Error 1332,New-SmbGlobalMapping

Also if I'm trying to put the user name with ".\user" I receive other error.

New-SmbGlobalMapping : No mapping between account names and security IDs was done.

FullyQualifiedErrorId : Windows System Error 1332,New-SmbGlobalMapping

User account is correct, user and key for the storage account are also correct. I've tried to create another account with admin rights, and I receive the same error. Can someone help me with some ideas?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,104 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Ferariu Armand Iulian 10 Reputation points
    2023-03-30T18:06:48.4466667+00:00

    Silly fix add localhost in front of storage account name when you add the drive. (localhost\storageaccount).

    1 person found this answer helpful.

  2. Amit Singh 4,896 Reputation points
    2023-03-28T10:27:28.0166667+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.