<# .SYNOPSIS .NOTES Version : 1.0 Author : Hubert CORNET Creation Date : 22/11/2022 Purpose/Change : .LINK https://www.tips-of-mine.fr .EXEMPLE .DESCRIPTION .PARAMETER .INPUTS .OUTPUTS .log> #> #---------------------------------------------------------[Initialisations]-------------------------------------------------------- # Définir l'action d'erreur pour continuer silencieusement $ErrorActionPreference = "SilentlyContinue" # Bibliothèques de fonctions requises #----------------------------------------------------------[Declarations]---------------------------------------------------------- # Version Script $sScriptVersion = "1.0" #Log File Info $sLogPath = "C:\Tmp" $sLogName = "Creation-Multi-Fichier.log" $sLogFile = Join-Path -Path $sLogPath -ChildPath $sLogName Start-Transcript -Path $sLogFile -NoClobber #-----------------------------------------------------------[Functions]------------------------------------------------------------ #--------------------------------------------------------[Debut Du Script]--------------------------------------------------------- 1..100 | %{ ($_ * (Get-Random -Max ([int]::maxvalue))) > "D:\script\file$_.txt"} #---------------------------------------------------------[Fin Du Script]---------------------------------------------------------- Stop-Transcript