title: Invoke-Command with static password
body: <p>I want to execute a script that requires privileges on a remote Windows Server machine , but each time i execute the script a pop-up window appears in order to type the password, so how can I add the password as a static parameter into the command so I can escape typing it each time (the password is fixe and unknown)</p>
  
  <p>Here is the code that I wrote </p>
  
  <pre><code>Param (
  $user
  )
  Invoke-Command -ComputerName 'Server.Admin.6NLG-AD' -FilePath C:\SECnology\Data\Utilities\PS_Block_Internet_Access_GPO.ps1 -ArgumentList $user  -Credential ADMIN\Administrateur 
  </code></pre>