{"id":135,"date":"2018-02-05T08:30:38","date_gmt":"2018-02-04T19:30:38","guid":{"rendered":"https:\/\/content.ronella.xyz\/apps\/wordpress\/?p=135"},"modified":"2018-02-07T09:07:07","modified_gmt":"2018-02-06T20:07:07","slug":"powershell-behind-proxy","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=135","title":{"rendered":"Powershell Behind Proxy"},"content":{"rendered":"<p><strong>Using the default network credentials<\/strong><\/p>\n<pre>(New-Object System.Net.WebClient).Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials<\/pre>\n<p><strong>Using a different credentials<\/strong><\/p>\n<p style=\"padding-left: 30px;\">Using Get-Credential<\/p>\n<pre>(New-Object System.Net.WebClient).Proxy.Credentials = Get-Credential<\/pre>\n<p style=\"padding-left: 30px;\">Using NetworkCredential Object<\/p>\n<pre>(New-Object System.Net.WebClient).Proxy.Credentials = New-Object System.Net.NetworkCredential(&lt;username&gt;, &lt;password&gt;)<\/pre>\n<p style=\"text-align: left;\"><em>Note: You can add any one of these to your <a href=\"https:\/\/www.ronella.xyz\/wordpress\/?p=151\" target=\"_blank\" rel=\"noopener\">powershell profile<\/a>\u00a0to allow it to have network connectivity by default using proxy.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using the default network credentials (New-Object System.Net.WebClient).Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials Using a different credentials Using Get-Credential (New-Object System.Net.WebClient).Proxy.Credentials = Get-Credential Using NetworkCredential Object (New-Object System.Net.WebClient).Proxy.Credentials = New-Object System.Net.NetworkCredential(&lt;username&gt;, &lt;password&gt;) Note: You can add any one of these to your powershell profile\u00a0to allow it to have network connectivity by default using proxy.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/135"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135"}],"version-history":[{"count":7,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":160,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/135\/revisions\/160"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}