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