Powershell/Serveur Microsoft/Import-Module-Offline.ps1
2023-07-04 12:59:44 +02:00

58 lines
1.8 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<#
.SYNOPSIS
<Overview of script>
.NOTES
Version : 1.0
Author : Hubert CORNET
Creation Date : <Date>
Purpose/Change : <Initial script development>
.LINK
https://www.tips-of-mine.fr
.EXEMPLE
<Example goes here. Repeat this attribute for more than one example>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
.INPUTS
<Inputs if any, otherwise state None>
.OUTPUTS
<Outputs if any, otherwise state None - example: Log file stored in C:\Windows\Temp\<name>.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 = "Import-Module-Offline.log"
$sLogFile = Join-Path -Path $sLogPath -ChildPath $sLogName
Start-Transcript -Path $sLogFile -NoClobber
#-----------------------------------------------------------[Functions]------------------------------------------------------------
#--------------------------------------------------------[Debut Du Script]---------------------------------------------------------
Find-Module Name *ReportHTML*| Select Name, Version, Repository
Save-Module Name ReportHTML Path C:\Automation\
#---------------------------------------------------------[Fin Du Script]----------------------------------------------------------
Stop-Transcript