Differences
This shows you the differences between the selected revisions of the page.
| 2017-11-13 | 2018-01-26 | ||
| removing unneeded exception type specification (martin) | back to "windows powershell" as winscp cannot be used with "powershell core" (martin) | ||
| Line 2: | Line 2: | ||
| ===== About PowerShell ===== | ===== About PowerShell ===== | ||
| - | [[wp>PowerShell|PowerShell]] is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on .NET Framework. | + | [[wp>PowerShell| Windows PowerShell]] is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on .NET Framework. |
| - | PowerShell is built into Windows 7 and newer; and is optionally available for Windows 98 SP2 and newer.((&wikipedia_ref(PowerShell|PowerShell))) &win9x | + | Windows PowerShell is built into Windows 7 and newer; and is optionally available for Windows 98 SP2 and newer.((&wikipedia_ref(PowerShell|PowerShell))) &win9x |
| - | PowerShell scripts can be directly executed, they do not need to be compiled first. | + | Windows PowerShell scripts can be directly executed, they do not need to be compiled first. |
| ===== [[scripting]] PowerShell Scripting ===== | ===== [[scripting]] PowerShell Scripting ===== | ||
| - | From WinSCP scripting perspective, important aspect of PowerShell (''powershell.exe'') is its ability to run simple, yet powerful, scripts that can make use functionality exposed by WinSCP .NET assembly. | + | From WinSCP scripting perspective, important aspect of Windows PowerShell (''powershell.exe'') is its ability to run simple, yet powerful, scripts that can make use functionality exposed by WinSCP .NET assembly. |
| The ''powershell.exe'' is located in ''%WINDIR%\System32\WindowsPowershell\v1.0''.((It's ''v1.0'', disregarding what version you actually use.)) Typically you run ''powershell.exe'' with ''-File'' argument followed by path to your PowerShell script. The script file needs to have ''.ps1'' extension: | The ''powershell.exe'' is located in ''%WINDIR%\System32\WindowsPowershell\v1.0''.((It's ''v1.0'', disregarding what version you actually use.)) Typically you run ''powershell.exe'' with ''-File'' argument followed by path to your PowerShell script. The script file needs to have ''.ps1'' extension: | ||
| Line 29: | Line 29: | ||
| powershell.exe -ExecutionPolicy Unrestricted -File upload.ps1 | powershell.exe -ExecutionPolicy Unrestricted -File upload.ps1 | ||
| </code> | </code> | ||
| + | |||
| + | //You cannot use WinSCP .NET assembly with PowerShell Core. WinSCP needs .NET Framework, it cannot work with .NET Core.// | ||
| ===== [[install]] Installing the Assembly ===== | ===== [[install]] Installing the Assembly ===== | ||