Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Solved

tmontana3x wrote:

as i found out ps 5.1. is also available on the system - with that its working

So before, did you try to use WinSCP from pwsh.exe?
tmontana3x

Solved

as i found out ps 5.1. is also available on the system - with that its working
Guest

Re: Powershell: Exception on New-Object WinSCP.Session

tmontana3x wrote:

martin wrote:

I'm not yet familiar with PowerShell Core 6, but note that WinSCP .NET assembly needs a full .NET Framework, not just .NET Core. So that can be the problem.


Best!


Hello again, Dot Net Framework 4.7.1 is already installed... any other ideas?
tmontana3x

Re: Powershell: Exception on New-Object WinSCP.Session

martin wrote:

I'm not yet familiar with PowerShell Core 6, but note that WinSCP .NET assembly needs a full .NET Framework, not just .NET Core. So that can be the problem.


Hello, thanks for the info, so i can just install .net framework (version?) and everything fine? Or does PS6 only accept .net core?

Best!
martin

Re: Powershell: Exception on New-Object WinSCP.Session

I'm not yet familiar with PowerShell Core 6, but note that WinSCP .NET assembly needs a full .NET Framework, not just .NET Core. So that can be the problem.
tmontana3x

Powershell: Exception on New-Object WinSCP.Session

Hello,
i hope you may help. I have Powershell 6 and when i try to New-Object WinSCP.Session i get the following error:

new-object : Exception calling ".ctor" with "0" argument(s): "Could not load type 'System.Diagnostics.PerformanceCounter' from assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."
At line:1 char:1
+ new-object winscp.session
+
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationEx
ception
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.
Commands.NewObjectCommand

I hope you can help me.

Thank you