Credential Request

Product: PowerShell Universal
Version: 4.2.9


In my apps, I use secret variables to execute commands that require privilege elevation.
Example :
Set-ADUser -Identity $SamAccountName -Description $Description -Credential $Secret:DSI
Regularly I get a popup asking me to re-enter the password
This request is quite annoying because I don’t want the password to be known by the users of this app.
Is this normal behavior?

I have two questions about this.

  1. what kind of system is behind the web address?
  2. why does the page use http?

I have found that the creation of PSCredentials in Powershell Universal only works properly if you specify the user in the format “domain\username”. The format “username@domain.tld” did not work at all, at least for us.

Behind this address is an exchange server. I use the code below to make exchange commands ;

$pso = New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://$ExchangeServer/PowerShell/?SerializationLevel=Full -Authentication Kerberos -Credential $Secret:DSI -SessionOption $pso
$null = Import-Module (Import-PSSession $session -AllowClobber -DisableNameChecking) -Global -DisableNameChecking

I’ll try to recreate a sercret with the format “domain\username” and see if that fixes the problem.

Using the domain\username format did not solve the problem. I still regularly get the popup message