Execute the following command in powershell.
wget -r --no-parent -w 1 -l 1 --restrict-file-names = nocontrol https://gihyo.jp/db/
I get the following error:
Invoke-WebRequest: Parameter'WebSession'cannot be bound."1"value from"System.Int32"type to"Microsoft.PowerShell.Commands.WebRequestSession"type
Occurrence line: 1 character: 24
+ wget -r --no-parent -w 1 -l 1 --restrict-file-names = nocontrol https:/...
+ CategoryInfo: InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
+ FullyQualifiedErrorId: CannotConvertArgumentNoMessage, Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Please tell me what to do. Thank you.
Answer # 1
The command and parameter specification combination you are using is incorrect.
The command listed in the question seems to be intended to use the
wgetcommand as described on the following page.
[wget] command-download file by specifying URL: Linux basic command Tips (24)[email protected]
However, Windows does not normally have the
wgetcommand equivalent to Linux.
wgetis defined as an alias for the Invoke-WebRequest cmdlet, and this is what was actually called.
And the parameter specification of
Invoke-WebRequestcmdlet is different from the Linux
wgetcommand, so an error occurs.
I think there are the following methods as countermeasures (examples only).
Specify parameters for PowerShell
Install and use a program to reproduce wget on Windows
wgetin Windows Subsystem for Linux
For more than this, please clarify what you want to use and what you want to do and create a separate question.Reference: Confirm alias
It is better to think of commands displayed on PowerShell that are not inYou can see the actual definition by using the
Verb-Nounformat and have no extension as aliases.
Get-Alias -Name wget
CommandType Name Version Source ----------- ---- ------- ------ Alias wget->Invoke-WebRequest
- vba - powershell cannot be executed
- cannot convert jquery to an external file
- unity - cannot convert float type to string type
- python 3x - i want to solve valueerror: cannot convert non-finite values (na or inf) to integer
- net framework - powershell cannot be started from cmd
- powershell script copy process cannot exclude multiple files
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved