Get-SmbOpenFile
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-ProcessMitigation -Name powershell.exe
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-SmbSession
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
whoami
Get-Process -Name powershell
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-ADOrganizationalUnit -Filter *
Get-WmiObject -Class Win32_Process | Where-Object {.Name -like '*spoolsv*'}
Get-WmiObject Win32_OperatingSystem
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-NetFirewallRule | Where-Object {.Enabled -eq 'True'}
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Disconnect-PSDrive Z
Import-Module ActiveDirectory
Get-Content C:\\Scripts\\deploy.ps1
Get-ADObject -LDAPFilter '(objectCategory=computer)'
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-Credential
Get-SmbShare
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-Credential
Get-WmiObject Win32_OperatingSystem
cls
Get-Acl -Path 'AD:\\OU=BadOU,DC=novatech,DC=local'
New-Item -Path C:\\Temp -ItemType Directory
Get-WmiObject Win32_OperatingSystem
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Get-ADUser -Filter 'Enabled -eq True'
Get-SmbSession
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-ScheduledTask
Get-ChildItem -Recurse C:\\Scripts\\
Get-NTFSAccess -Path C:\\SYSVOL
Get-Service -Name WinRM | Format-List *
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-Content C:\\Scripts\\deploy.ps1
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-ProcessMitigation -Name powershell.exe
hostname
Get-ADGroupMember 'Domain Admins'
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Set-Location C:\\Temp
Get-EventLog -LogName Application -Newest 50
Remove-Item C:\\Temp\\old_log.log -Force
Get-Service -Name WinRM | Format-List *
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-WmiObject Win32_OperatingSystem
Get-ADServiceAccount -Filter * -Properties *
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Get-Credential
Get-Credential
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Test-Connection -ComputerName dc01.novatech.local
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-ADOrganizationalUnit -Filter *
Remove-Item C:\\Temp\\old_log.log -Force
Get-Date
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-SmbOpenFile
Get-ADGroup -Filter *
Get-Credential
Get-ADPrincipalGroupMembership svc_backup
hostname
Get-NetIPAddress
Get-ADUser -Filter 'Enabled -eq True'
Get-ADGroup -Filter *
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Import-Module ActiveDirectory
Test-Connection -ComputerName dc01.novatech.local
Get-ScheduledTask
Write-Host 'Operation terminée'
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Get-ADServiceAccount -Filter * -Properties *
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-ADObject -LDAPFilter '(objectCategory=computer)'
systeminfo
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-ADGroup -Filter *
Get-ADPrincipalGroupMembership svc_backup
Get-SmbSession
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-ADGroupMember 'Domain Admins'
hostname
Get-Command -Module ActiveDirectory
Get-ADGroup -Filter *
Get-Service | Where-Object {.Status -eq 'Running'}
Get-Date
Get-ADUser -Filter 'Enabled -eq True'
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-ADServiceAccount -Filter * -Properties *
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Get-Service | Where-Object {.Status -eq 'Running'}
Get-Credential
Test-Connection -ComputerName dc01.novatech.local
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-Credential
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Test-Connection -ComputerName dc01.novatech.local
whoami
Get-WmiObject -Class Win32_Process | Where-Object {.Name -like '*spoolsv*'}
Test-Connection -ComputerName dc01.novatech.local
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Start-Sleep -Seconds 10
Get-NetFirewallRule | Where-Object {.Enabled -eq 'True'}
Get-ScheduledTask
Get-Content C:\\Scripts\\deploy.ps1
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
