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