Set-Location C:\\Temp
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-ChildItem -Recurse C:\\Scripts\\
Get-ADServiceAccount -Filter * -Properties *
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Test-Connection -ComputerName dc01.novatech.local
whoami
whoami
Write-Host 'Operation terminée'
Get-Content C:\\Scripts\\deploy.ps1
Get-Service | Where-Object {.Status -eq 'Running'}
Get-Acl -Path 'AD:\\OU=BadOU,DC=novatech,DC=local'
Get-Process | Where-Object {.CPU -gt 100}
Get-ADGroup -Filter *
Get-Command -Module ActiveDirectory
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Import-Module ActiveDirectory
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-ADObject -LDAPFilter '(objectCategory=computer)'
ipconfig /all
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-ADUser svc_backup -Properties lastLogonTimestamp
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-NTFSAccess -Path C:\\SYSVOL
Get-ChildItem -Recurse C:\\Scripts\\
Set-Location C:\\Temp
Get-NetIPAddress
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Get-CimInstance -ClassName Win32_QuickFixEngineering
New-Item -Path C:\\Temp -ItemType Directory
Start-Sleep -Seconds 10
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Get-ADPrincipalGroupMembership svc_backup
Get-ADUser svc_backup -Properties lastLogonTimestamp
cls
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-ChildItem -Recurse C:\\Scripts\\
Get-Process | Where-Object {.CPU -gt 100}
Get-ChildItem -Recurse C:\\Scripts\\
Get-ScheduledTask
Get-ADServiceAccount -Filter * -Properties *
Get-ADGroupMember 'Domain Admins'
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-LocalGroupMember -Group 'Administrators'
Get-Command -Module ActiveDirectory
Get-ADUser -Filter 'Enabled -eq True'
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Import-Module ActiveDirectory
cls
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-ADGroup -Filter *
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Restart-Service -Name 'WinRM'
Get-ChildItem -Recurse C:\\Scripts\\
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-NetFirewallProfile
Disconnect-PSDrive Z
cls
New-Item -Path C:\\Temp -ItemType Directory
Get-CimInstance -ClassName Win32_QuickFixEngineering
whoami
Set-ExecutionPolicy RemoteSigned -Scope Process
Get-HotFix -Id KB5005565
Get-ADOrganizationalUnit -Filter *
Get-Content C:\\Scripts\\deploy.ps1
whoami
Get-NetIPAddress
Get-WmiObject -Class Win32_Process | Where-Object {.Name -like '*spoolsv*'}
Write-Host 'Operation terminée'
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-SmbSession
Disconnect-PSDrive Z
Get-SmbOpenFile
Get-ADUser svc_backup -Properties lastLogonTimestamp
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-Process | Where-Object {.CPU -gt 100}
Get-ADGroup -Filter *
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Remove-Item C:\\Temp\\old_log.log -Force
Remove-Item C:\\Temp\\old_log.log -Force
systeminfo
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
hostname
Remove-Item C:\\Temp\\old_log.log -Force
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-EventLog -LogName Application -Newest 50
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Import-Module ActiveDirectory
Get-SmbOpenFile
New-Item -Path C:\\Temp -ItemType Directory
Get-ADGroup -Filter *
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
hostname
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Test-Connection -ComputerName dc01.novatech.local
Get-WmiObject Win32_OperatingSystem
Get-ScheduledTask
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
New-Item -Path C:\\Temp -ItemType Directory
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-ADGroup -Filter *
Get-Process | Where-Object {.CPU -gt 100}
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-Credential
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-Service | Where-Object {.Name -like '*crypt*'}
Get-Command -Module ActiveDirectory
Get-SmbOpenFile
Get-Service -Name WinRM | Format-List *
Restart-Service -Name 'WinRM'
