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