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