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
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