Differences
This shows you the differences between the selected revisions of the page.
| 2016-10-12 | 2016-10-12 | ||
| created (martin) | -STA is needed for Clipboard in PowerShell 2 + explicit value to switch parameter argument for compatibility with PowerShell 2 + -noprofile for fast execution (martin) | ||
| Line 8: | Line 8: | ||
| <code powershell - GenerateHttpUrl.ps1> | <code powershell - GenerateHttpUrl.ps1> | ||
| # @name Generate &HTTP Url | # @name Generate &HTTP Url | ||
| - | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -webRoot "%WebRoot%" -rootPath "%RootPath%" -hostName "%HostName%" -serverName "!@" -path "!/!" %Https% %Pause% %Clipboard% %Open% | + | # @command powershell.exe -ExecutionPolicy Bypass -STA -NoProfile -File "%EXTENSION_PATH%" -webRoot "%WebRoot%" -rootPath "%RootPath%" -hostName "%HostName%" -serverName "!@" -path "!/!" %Https% %Pause% %Clipboard% %Open% |
| # @description Generates HTTP URL of the selected file | # @description Generates HTTP URL of the selected file | ||
| # @flag RemoteFiles | # @flag RemoteFiles | ||
| Line 27: | Line 27: | ||
| param ( | param ( | ||
| - | [Parameter(Mandatory)] | + | [Parameter(Mandatory = $True)] |
| $webRoot, | $webRoot, | ||
| $rootPath, | $rootPath, | ||
| $hostName, | $hostName, | ||
| $serverName, | $serverName, | ||
| - | [Parameter(Mandatory)] | + | [Parameter(Mandatory = $True)] |
| $path, | $path, | ||
| [Switch] | [Switch] | ||