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