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