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