Bonjour,
Je rencontre un problème sur l'envoi de données dans un mail. Je cherche à lister les fichiers d'un dossier, et à inclure cette liste format tableau dans le contenu d'un mail. Voici le code :
Code PowerShell : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
Avec le code tel quel, le Write-Host affiche les fichiers sous le format :Dans le mail, elle n'apparaît pas.Liste des fichiers : @{Name=fic1.xz; LastWriteTime=11/04/2021 03:48:51} @{Name=fic2.xz; LastWriteTime=11/04/2021 03:48:53} @{Name=fic3.xz; LastWriteTime=11/04
/2021 03:48:53}
Si je décommente le format-table, j'obtiens ceci :
et ce texte est inclus dans le mail.Liste des fichiers : Microsoft.PowerShell.Commands.Internal.Format.FormatStartData Microsoft.PowerShell.Commands.Internal.Format.GroupStartData Microsoft.PowerShell.Commands.Internal.Format.
FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.Group
EndData Microsoft.PowerShell.Commands.Internal.Format.FormatEndData
Si j'enlève le select-object, j'ai la liste des fichiers, mais pas la date de modif
Merci pour votre aide.

 

 
		
		 
         
 

 
			
			




 Problème de formatage de la sortie
 Problème de formatage de la sortie
				
 Répondre avec citation
  Répondre avec citation


 
   
 
 
						
Partager