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