function Download-File($url, $file) {
$webclient = New-Object System.Net.WebClient
$webclient.DownloadFile($url,$file)
}
Run Document cmdlet and get this error message
Message text:
---------------------------
Sublime Text
---------------------------
get-command : The term 'Download-File' 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.
At C:\Users\sevoroby\AppData\Roaming\Sublime Text 3\Packages\Powershell Help
Generator\Get-HelpTemplate.ps1:5 char:6
+ $c = get-command $commandName
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Download-File:String) [Get-Comm
and], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co
mmands.GetCommandCommand
Cannot index into a null array.
At C:\Users\sevoroby\AppData\Roaming\Sublime Text 3\Packages\Powershell Help
Generator\Get-HelpTemplate.ps1:24 char:5
+ $parameter = $c.Parameters[$_]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\sevoroby\AppData\Roaming\Sublime Text 3\Packages\Powershell Help
Generator\Get-HelpTemplate.ps1:25 char:5
+ $parameters += $c.Parameters[$_]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
---------------------------
OK
---------------------------
I created file with content
Run
Document cmdlet
and get this error messageMessage text: