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