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