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