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