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