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