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