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