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