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