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