SMBShare PSSessionConfoguration Error

Welcome Forums General PowerShell Q&A SMBShare PSSessionConfoguration Error

This topic contains 2 replies, has 2 voices, and was last updated by

4 years, 8 months ago.

  • Author
  • #16175

    Points: 0
    Rank: Member


    I'm trying to create a PS endpoint for the use of the SMBShare module. I create the PSSessionConfigurationFile and register it seccessfully, but when I try to enter a session using this config, I get this error that the C drive doesn't exist:

    Enter-PSSession : One or more errors occurred processing the module 'smbshare' specified in the InitialSessionState object used to create this runspace. See the ErrorRecords property for a 
    complete list of errors. The first error was: Cannot find drive. A drive with the name 'C' does not exist.
    At line:1 char:1
    + Enter-PSSession -ComputerName igep -ConfigurationName netadapter
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (:) [Enter-PSSession], RunspaceOpenModuleLoadException
        + FullyQualifiedErrorId : ErrorLoadingModulesOnRunspaceOpen

    Pretty interesting.

  • #16212

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    If you limited the configuration so that it can't load PSDrives, this can happen. The shell wants to start in a directory, but if it doesn't have a drive, it can't. And the SmbShare module in particular may have a dependency on being able to access a drive.

    Sessions with no drives are usually only accessible by Invoke-Command, which doesn't try to create a prompt. Although, again, if SmbShare has a dependency, you will have to satisfy it.

  • #16213

    Points: 0
    Rank: Member

    I never thought of it! I'll try it, thank you!

The topic ‘SMBShare PSSessionConfoguration Error’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort