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