Vous êtes sur la page 1sur 1

Exercice 2:

1- la cmdlet Get-Command

2- la cmdlet Get-EventLog

3- la cmdlet Get-Alias

4- la même cmdlet Get-Alias avec le paramètre -Definition

5- la cmdlet Get-Date

la cmdlet Set-Date avec le paramètre -Date

Exercice 3:

1- New-Item -ItemType Directory -Path "C:\Systeme Exploitation"

2- New-Item -ItemType Directory -Path "C:\Systeme Exploitation\Cours_SE"

New-Item -ItemType Directory -Path "C:\Systeme Exploitation\TravauxPratiques_SE"

3- New-Item -ItemType File -Path "C:\Systeme Exploitation\Cours_SE\Chap1_Windows.txt"

New-Item -ItemType File -Path "C:\Systeme Exploitation\Cours_SE\Chap2_Linux.txt"

4- New-Item -ItemType File -Path "C:\Systeme Exploitation\TravauxPratiques_SE\TP_Windows.txt"

New-Item -ItemType File -Path "C:\Systeme Exploitation\TravauxPratiques_SE\TP_Linux.txt"

5- New-Item -ItemType File -Path "C:\Systeme


Exploitation\TravauxPratiques_SE\TP_Windows(1).txt"

6- Copy-Item -Path "C:\Systeme Exploitation" -Destination "D:\" -Recurse

7- Copy-Item -Path "C:\Systeme Exploitation" -Destination "D:\" -Recurse

Remove-Item -Path "C:\Systeme Exploitation" -Recurse

8- Rename-Item -Path "D:\Systeme Exploitation" -NewName "FormationSE"

9- if (-Not (Test-Path "C:\Systeme Exploitation\TravauxPratiques_SE\test.txt")) {

New-Item -ItemType File -Path "C:\Systeme Exploitation\TravauxPratiques_SE\test.txt"

10- Remove-Item -Path "C:\Systeme Exploitation\Cours_SE\Chap1_Windows.txt"

11- Get-ChildItem "C:\Systeme Exploitation\TravauxPratiques_SE" | Where-Object { $_.Name -ne


"test.txt" } | Remove-Item -Force

Vous aimerez peut-être aussi