Notice: Due to size constraints and loading performance considerations, scripts referenced in blog posts are not attached directly. To request access, please complete the following form: Script Request Form Note: A Google account is required to access the form.
Disclaimer: I do not accept responsibility for any issues arising from scripts being run without adequate understanding. It is the user's responsibility to review and assess any code before execution. More information

Set Powershell profile variables

 If you need to set certain values in your powershell profile then you can do with this simple how-to, first start powershell

Then type : notepad  $profile

If you do not have a profile file you will be asked if you want to create one.

Obviously your response here is "yes" you want to create it then once you have created this file, you can set all your variables which it will load on start-up all the time, here I set my proxy server ad I required TLS1.2 only as SSL should not be used anymore:

[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('http://proxy.bears.cloud:3129')[system.net.webrequest]::defaultwebproxy.credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Previous Post Next Post

نموذج الاتصال