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