I have powershell task that need to load a powershell profile, but I can see that the powershell task at Azure DevOps is executed with -NoProfile.
C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted
Can we change it? I need to use a profile so that powershell.exe is aware about the proxy information.
The reason behind loading a powershell profile:
- Setup PowerShell Proxy accrding to PowerShell Proxy
Without this setup Connect-PnP-Online fails with the following exception:
System.Net.WebException The remote name could not be resolved: 'domainname.sharepoint.com'