Recettes PowerShell

De Linuxmemo.

(Différences entre les versions)
(Page créée avec « PowerShell ==exécuter une commande stocké dans une variable== Invoke-Command -ComputerName $Ip -Credential $login -ScriptBlock { Param( $LocalVariable ); Invoke-Expres... »)
(exécuter une commande stocké dans une variable)
Ligne 1 : Ligne 1 :
 +
[[PowerShell]]
[[PowerShell]]
[[PowerShell]]
==exécuter une commande stocké dans une variable==
==exécuter une commande stocké dans une variable==
  Invoke-Command -ComputerName $Ip -Credential $login -ScriptBlock { Param( $LocalVariable ); Invoke-Expression -Command $LocalVariable } -ArgumentList $commande
  Invoke-Command -ComputerName $Ip -Credential $login -ScriptBlock { Param( $LocalVariable ); Invoke-Expression -Command $LocalVariable } -ArgumentList $commande

Version du 4 avril 2018 à 08:34

PowerShell PowerShell

exécuter une commande stocké dans une variable

Invoke-Command -ComputerName $Ip -Credential $login -ScriptBlock { Param( $LocalVariable ); Invoke-Expression -Command $LocalVariable } -ArgumentList $commande
Outils personnels