1
votes

I use Powershell Remoting version 2.0.
I have downloaded the Carbon Powershell Module. I copied it in shared folder:

\SharedServer\PowershellModules\Carbon-1.0.0

In my script ps1, I have this source code:

$PSPathCarbon = "\\SharedServer\PowershellModules\Carbon-1.0.0\Carbon"
. (Join-Path $PSPathCarbon Import-Carbon.ps1)

I get the following error:

The term '\SharedServer\PowershellModules\Carbon-1.0.0\Carbon\Import-Carbon.ps1' 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.

Any suggestions about it?

1

1 Answers

0
votes

Try:

. (Join-Path $PSPathCarbon 'Import-Carbon.ps1')

Or:

. "$PSPathCarbon\Import-Carbon.ps1"