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