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