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