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