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