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