wsdl : The term 'wsdl' is not recognized as the name of a cmdlet

How to use the wsdl command from Windows 10?

PS C:\Users\thufir>
PS C:\Users\thufir> wsdl http://holidaywebservice.com/HolidayService_v2/HolidayService2.asmx
wsdl : The term 'wsdl' 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 line:1 char:1
+ wsdl http://holidaywebservice.com/HolidayService_v2/HolidayService2.a ...
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (wsdl:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\thufir>

I don't have admin access. System info:

PS C:\Users\thufir>
PS C:\Users\thufir> get-host


Name             : ConsoleHost
Version          : 5.1.14393.1944
InstanceId       : d740419c-8824-4cf5-a0cb-3b26437406bb
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-CA
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace



PS C:\Users\thufir>
PS C:\Users\thufir> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.1944
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1944
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


PS C:\Users\thufir>

Oddly, the command works fine on Linux PowerShell, but not from Windows 10 as here.

For the sake of privacy, I changed the powershell prompt: function prompt { "thufir >" } The pwd is of the form: C:\Users\<username> >


Solution 1:

Do you have .NET SDK installed? First you need to check whether you have the wsdl.exe available at the below location :

C:\Program Files (x86)\Microsoft SDKs\Windows\<version folder>\bin folder

if not, install the .NET SDK from MSDN web site.

Also, wsdl command expects the WSDL url of the web service, looks like you are passing the ASMX url - which might not help. In this case the WSDL URL will be http://holidaywebservice.com/HolidayService_v2/HolidayService2.asmx?wsdl