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