Solved

Powershell New-WebServiceProxy Credentials Issue

Posted on 2013-06-17
1
1,742 Views
Last Modified: 2013-06-17
Hello,
I'm trying to connect to a web service with alternate credentials, but it just won't work
What am I doing wrong?

$username = "Domain\Test"
$password = "Test1234
 
$secpassword = ConvertTo-SecureString -String $Password -AsPlainText -Force
 
$creds = New-Object System.Management.Automation.PSCredential $username,$secpassword

$webservice = New-WebServiceProxy -Uri "http://cimsws.nam.nsroot.net/cmGroup/group.asmx" -Credential $creds

Getting unauthorized 401 status
If I manually enter the credentials it works or if I use -DefaultCredentials
0
Comment
Question by:mcazabonnet
1 Comment
 
LVL 4

Accepted Solution

by:
mcazabonnet earned 0 total points
ID: 39254482
The password contained special characters, solution was to place the password in single quotes
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Why would I want to create a function for tracking messages? I am glad you asked. As with most monotonous/routine tasks, human error tends to creep in after doing the same task over and over again. By creating a function, you load the function once…
Synchronize a new Active Directory domain with an existing Office 365 tenant
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now