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