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