Project

General

Profile

Tâche #26652

Scénario #26447: Traitement express MEN (5-7)

Client AD : Le script Powershell ps.ps1 n'interprète pas les variables d'environnement issues des fichiers du répertoire /home/sysvol/REALM/scripts

Added by Fabrice Barconnière over 4 years ago. Updated over 4 years ago.

Status:
Fermé
Priority:
Normal
Start date:
02/05/2019
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Remaining (hours):
0.0

Description

Exemple:
Si on crée un fichier /home/sysvol/REALM/scripts/os/Vista.txt contenant :

cmd,%WINDIR%\notepad.exe,NOWAIT

Le script ps.ps1 n'interprète pas la variable WINDIR.
Comme c'est du Powershell, j'ai essayé avec $env:WINDIR sans succès. La commande exécutée est $env:WINDIR\notepad.exe, donc une erreur se produit.

À FAIRE

Trouver un système qui permet d'utiliser des variables d'environnement dans les fichiers scripts.

Associated revisions

Revision c10b2a3d (diff)
Added by Fabrice Barconnière over 4 years ago

Powersgell logon script must evaluate environment variables used in gpo scripts

ref #26652

History

#1 Updated by Fabrice Barconnière over 4 years ago

  • Description updated (diff)

#2 Updated by Fabrice Barconnière over 4 years ago

  • Tracker changed from Scénario to Tâche

#3 Updated by Fabrice Barconnière over 4 years ago

  • Target version set to sprint 2019 5-7 Equipe MENSR
  • Estimated time set to 2.00 h
  • Parent task set to #26447
  • Remaining (hours) set to 2.0

#4 Updated by Fabrice Barconnière over 4 years ago

  • Status changed from Nouveau to En cours
  • Start date set to 02/05/2019

#5 Updated by Fabrice Barconnière over 4 years ago

  • Assigned To set to Fabrice Barconnière

#6 Updated by Fabrice Barconnière over 4 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.0 to 0.0

On conserve la syntaxe du type %WINDIR%
Ça fonctionne en créant le fichier /home/sysvol/REALM/scripts/os/Vista.txt contenant :

cmd,%WINDIR%\notepad.exe,NOWAIT

#7 Updated by Joël Cuissinat over 4 years ago

  • Status changed from Résolu to Fermé

Vu en 2.7.1

Also available in: Atom PDF