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