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