Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Import-Module ActiveDirectory
Get-ADObject -LDAPFilter '(objectCategory=computer)'
hostname
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Remove-Item C:\\Temp\\old_log.log -Force
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-ADOrganizationalUnit -Filter *
Get-Service -Name WinRM | Format-List *
Get-NTFSAccess -Path C:\\SYSVOL
Remove-Item C:\\Temp\\old_log.log -Force
Get-WmiObject Win32_OperatingSystem
Import-Module ActiveDirectory
Start-Sleep -Seconds 10
Set-ExecutionPolicy RemoteSigned -Scope Process
Disconnect-PSDrive Z
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Get-SmbShare
Get-EventLog -LogName System -Newest 50
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-Process -Name powershell
Get-SmbSession
Get-EventLog -LogName System -Newest 50
Get-ADGroupMember 'Domain Admins'
Get-Credential
Get-ADServiceAccount -Filter * -Properties *
Restart-Service -Name 'WinRM'
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-Credential
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Disconnect-PSDrive Z
Start-Sleep -Seconds 10
Set-ExecutionPolicy RemoteSigned -Scope Process
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-ADUser -Filter 'Enabled -eq True'
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Get-NetFirewallRule | Where-Object {.Enabled -eq 'True'}
Get-ADUser -Filter 'Enabled -eq True'
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-Command -Module ActiveDirectory
Get-ChildItem -Recurse C:\\Scripts\\
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-ProcessMitigation -Name powershell.exe
Get-ADServiceAccount -Filter * -Properties *
systeminfo
Get-CimInstance -ClassName Win32_QuickFixEngineering
cls
Write-Host 'Operation terminée'
Test-NetConnection google.com
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Test-Connection -ComputerName dc01.novatech.local
Disconnect-PSDrive Z
cls
Get-ADUser -Filter 'Enabled -eq True'
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-SmbShare
Get-Date
Get-ADGroupMember 'Domain Admins'
Test-Connection -ComputerName dc01.novatech.local
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-WmiObject Win32_OperatingSystem
Import-Module ActiveDirectory
whoami
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Disconnect-PSDrive Z
cls
whoami
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Set-ExecutionPolicy RemoteSigned -Scope Process
Get-ADGroup -Filter *
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Write-Host 'Operation terminée'
Get-ADPrincipalGroupMembership svc_backup
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Get-Acl -Path 'AD:\\OU=BadOU,DC=novatech,DC=local'
Get-Date
Set-ExecutionPolicy RemoteSigned -Scope Process
Set-ExecutionPolicy RemoteSigned -Scope Process
Disconnect-PSDrive Z
Get-SmbSession
Get-ADOrganizationalUnit -Filter *
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Get-EventLog -LogName System -Newest 50
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-Command -Module ActiveDirectory
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
New-Item -Path C:\\Temp -ItemType Directory
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-WmiObject Win32_OperatingSystem
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
cls
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Restart-Service -Name 'WinRM'
Get-EventLog -LogName System -Newest 50
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-SmbOpenFile
Get-WmiObject Win32_OperatingSystem
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-Service -Name WinRM | Format-List *
Get-ADOrganizationalUnit -Filter *
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
whoami
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-ADUser -Filter 'Enabled -eq True'
systeminfo
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Get-ADOrganizationalUnit -Filter *
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Get-HotFix -Id KB5005565
