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