search for: usedefaultcredentials

Displaying 1 result from an estimated 1 matches for "usedefaultcredentials".

2013 Apr 15
5
Using onlyif for Windows exec
...ng the Web Pages (into SharePoint in this case) and I only want to run this step, if these pages don''t already exist. To that end, I have done something like this: onlyif => ''$webRequest = [System.Net.WebRequest]::Create("http://some-url.test.aspx"); $webRequest.UseDefaultCredentials = $true; try { if([int]$webRequest.GetResponse().StatusCode -eq "200") { exit 0; } else { exit 1; } } catch [System.Net.WebException] { exit 1; }'' Which, at the command line, has the correct result. However, when I try to run this, I get an error saying that $webRequest is n...