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