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