« PowerShell » : différence entre les versions
Aller à la navigation
Aller à la recherche
m (→Youtube) |
m (→Autre) |
||
| (4 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 20 : | Ligne 20 : | ||
=== Youtube === | === Youtube === | ||
==== Chaine Youtube ==== | |||
John Savill's Technical Training, chaîne Youtube | John Savill's Technical Training, chaîne Youtube | ||
* https://www.youtube.com/@NTFAQGuy | * https://www.youtube.com/@NTFAQGuy | ||
| Ligne 35 : | Ligne 37 : | ||
CyberAutomate : | CyberAutomate : | ||
* https://www.youtube.com/@CyberAutomate/videos | * https://www.youtube.com/@CyberAutomate/videos | ||
==== Vidéo ==== | |||
{{youtube | |||
| Nom de la chaine = Research Triangle PowerShell Users Group | |||
| URL de la chaine = https://www.youtube.com/@RTPSUG | |||
| Intitulé de la vidéo = Getting Started using Custom Formatters with Jeff Hicks | |||
| URL de la vidéo = https://www.youtube.com/watch?v=9CTJNHXJzwU | |||
| Date = 10/04/2025 | |||
| Durée = 1 h 5 min 1 s | |||
| Commentaire 1 = | |||
| Commentaire 2 = | |||
}} | |||
== Document == | == Document == | ||
| Ligne 49 : | Ligne 63 : | ||
* https://www.it-connect.fr/powershell-copier-des-fichiers-avec-bits/ | * https://www.it-connect.fr/powershell-copier-des-fichiers-avec-bits/ | ||
PowerShell | PowerShell, convertir PS1 en EXE ; création d'un exécutable : | ||
* https://www.it-connect.fr/powershell-convertir-ps1-en-exe-executable/ | * https://www.it-connect.fr/powershell-convertir-ps1-en-exe-executable/ | ||
* https://www.majorgeeks.com/files/details/ps1_to_exe.html | * https://www.majorgeeks.com/files/details/ps1_to_exe.html | ||
PowerShell, BornToBeRoot/PowerShell : | |||
* https://github.com/BornToBeRoot/PowerShell | |||
* https://github.com/BornToBeRoot/PowerShell/tree/master/Module/LazyAdmin/Functions/Network | |||
== Interface graphique == | == Interface graphique == | ||
| Ligne 69 : | Ligne 87 : | ||
* <source inline>Set-Service -Name wuauserv -StartupType Disabled</source> | * <source inline>Set-Service -Name wuauserv -StartupType Disabled</source> | ||
== | == Autre == | ||
=== Exercice, grille === | |||
<source> | <source> | ||
# Exemple : Auto-size Out-GridView | |||
$data = 1..20 | ForEach-Object { [PSCustomObject]@{ Number = $_; Square = $_ + $_ } } | Out-GridView -Title "Auto-sized Grid" -PassThru | |||
</source> | </source> | ||
=== Logiciel menu === | === Logiciel menu === | ||
<source>#################### - VARIABLES - #################### | <source> | ||
#################### - VARIABLES - #################### | |||
$logiciel = @( | $logiciel = @( | ||
[pscustomobject]@{nom="7Zip"; path="C:\Support\7zip\7z2201-x64.exe"} | [pscustomobject]@{nom="7Zip"; path="C:\Support\7zip\7z2201-x64.exe"} | ||
Dernière version du 4 décembre 2025 à 14:04
PowerShell est un langage de programmation pour les systèmes Microsoft Windows.
Référence
IT-Connect
- http://www.it-connect.fr/powershell-pour-les-debutants-1ere-partie/
- http://www.it-connect.fr/powershell-et-active-directory-modifier-le-domaine-des-adresses-mails/
- http://www.it-connect.fr/active-directory-supprimer-les-ordinateurs-dune-ou-en-powershell/
- http://www.it-connect.fr/creer-des-comptes-utilisateurs-par-lot-avec-powershell-v2-et-le-module-active-directory-server-2008-r2/
- http://www.it-connect.fr/chapitres/modifier-la-resolution-de-lecran/
Convention de nommage (charte de nommage) pour ses serveurs :
Marie Pascal Delamare
Site de Marie Pascal Delamare, BTS SIO / STS SIO
Youtube
Chaine Youtube
John Savill's Technical Training, chaîne Youtube
- https://www.youtube.com/@NTFAQGuy
- série de vidéos sur PowerShell :
TechSnips by ATA Learning, chaine Youtube, sélection "Doing anything with PowerShell", 334 vidéos au 29/05/2023 :
TechThoughts, chaine Youtube, 41 vidéos au 11/06/2023 :
- https://www.youtube.com/@Techthoughts2/videos
- série de vidéos sur PowerShell :
CyberAutomate :
Vidéo
Youtube, Research Triangle PowerShell Users Group, Getting Started using Custom Formatters with Jeff Hicks
- https://www.youtube.com/watch?v=9CTJNHXJzwU
- date : 10/04/2025 • durée : 1 h 5 min 1 s
Document
Gestion des path sous PowerShell, PDF, 31 pages :
Source de script
Gérer les autorisations NTFS avec PowerShell :
Copie de fichiers avec BITS (Background Intelligent Transfer Service) :
PowerShell, convertir PS1 en EXE ; création d'un exécutable :
- https://www.it-connect.fr/powershell-convertir-ps1-en-exe-executable/
- https://www.majorgeeks.com/files/details/ps1_to_exe.html
PowerShell, BornToBeRoot/PowerShell :
- https://github.com/BornToBeRoot/PowerShell
- https://github.com/BornToBeRoot/PowerShell/tree/master/Module/LazyAdmin/Functions/Network
Interface graphique
- Exemple d'interface graphique :
Windows10Debloater
Script si problème mise à jour Windows
Le service "Windows Update" s'appelle wuauserv :
Stop-Service -Name wuauservStart-Service -Name wuauservSet-Service -Name wuauserv -StartupType AutomaticSet-Service -Name wuauserv -StartupType ManualSet-Service -Name wuauserv -StartupType Disabled
Autre
Exercice, grille
# Exemple : Auto-size Out-GridView
$data = 1..20 | ForEach-Object { [PSCustomObject]@{ Number = $_; Square = $_ + $_ } } | Out-GridView -Title "Auto-sized Grid" -PassThru
#################### - VARIABLES - ####################
$logiciel = @(
[pscustomobject]@{nom="7Zip"; path="C:\Support\7zip\7z2201-x64.exe"}
[pscustomobject]@{nom="VLC"; path="C:\Support\VLC\vlc-3.0.17.4-win64.exe"}
[pscustomobject]@{nom="Adobe"; path="C:\Support\AdobeXI\AcroRdrDC2101120039_fr_FR.exe"}
[pscustomobject]@{nom="BgInfo"; path="C:\Support\BgInfo\setup-BGInfo4.27.exe"}
[pscustomobject]@{nom="Bureau distant"; path="C:\Support\Bureau distant\setup-bureau distant-v202211.exe"}
)
Clear-Host
#################### - SCRIPT - ####################
$continue = $true
While ($continue) {
Write-Host "-------------------- Logiciel --------------------" -ForegroundColor Cyan
Write-Host "> 1 --->" $logiciel[0].nom -ForegroundColor Cyan
Write-Host "> 2 --->" $logiciel[1].nom -ForegroundColor Cyan
Write-Host "> 3 --->" $logiciel[2].nom -ForegroundColor Cyan
Write-Host "> 4 --->" $logiciel[3].nom -ForegroundColor Cyan
Write-Host "> 5 --->" $logiciel[4].nom -ForegroundColor Cyan
Write-Host "> Tout ---> Installation de tous les logiciels de la liste" -ForegroundColor Cyan
Write-Host "--------------------------------------------------" -ForegroundColor Cyan
Write-Host "Sélectionner une option ou un type" -NoNewline
Write-Host " [fin] " -ForegroundColor Yellow -NoNewline
Write-Host "pour sortir : " -NoNewline
$choix = Read-Host
Switch ($choix) {
"1" {
try {
Write-Host "Installation de"$logiciel[0].nom"sur le poste"
Start-Process -FilePath $logiciel[0].path -ArgumentList "/S" -NoNewWindow -Wait
}
catch {
Clear-Host
Write-Warning "L'installation n'a pas pu se faire !"
}
}
"2" {
Write-Host "Installation de"$logiciel[1].nom"sur le poste"
Start-Process -FilePath $logiciel[1].path -ArgumentList "/S" -NoNewWindow -Wait
}
"3" {
Write-Host "Installation de"$logiciel[2].nom"sur le poste"
Start-Process -FilePath $logiciel[2].path -ArgumentList "/S" -NoNewWindow -Wait
}
"4" {
Write-Host "Installation de"$logiciel[3].nom"sur le poste"
Start-Process -FilePath $logiciel[3].path -ArgumentList "/S" -NoNewWindow -Wait
}
"5" {
Write-Host "Installation de"$logiciel[4].nom"sur le poste"
Start-Process -FilePath $logiciel[4].path -ArgumentList "/S" -NoNewWindow -Wait
}
"all" {
Write-Host "Installation de"$logiciel[0,1,2,3,4].nom"sur le poste"
Start-Process -FilePath $logiciel[0,1,2,3,4].path -ArgumentList "/S" -NoNewWindow -Wait
}
"fin" {
$continue = $false
}
default {
Clear-Host
Write-Warning "Choix invalide"
}
}
}