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