Remove-Item C:\Temp\old_log.log -Force
Get-WmiObject -Class Win32_Process | Where-Object { $_.Name -like '*spoolsv*' }
Get-EventLog -LogName System -Newest 50
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Get-EventLog -LogName Application -Newest 50
Get-LocalGroupMember -Group 'Administrators'
systeminfo
Copy-Item -Path C:\Temp\* -Destination Z:\Backup\
Get-ADComputer -Filter *
hostname
Get-LocalGroupMember -Group 'Administrators'
systeminfo
Get-Service | Where-Object { $_.Status -eq 'Running' }
Get-ChildItem -Recurse C:\Scripts\
Get-ADComputer -Filter * -Properties * | Export-Csv -Path C:\Reports\Computers.csv
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-WmiObject -Class Win32_Process | Where-Object { $_.Name -like '*spoolsv*' }
Get-EventLog -LogName Application -Newest 50
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-ADUser -Filter *
Get-Service | Where-Object { $_.Status -eq 'Running' }
Get-ChildItem -Recurse C:\Scripts\
Get-EventLog -LogName System -Newest 50
Get-SmbOpenFile
Get-Command -Module ActiveDirectory
Get-Service | Where-Object { $_.Status -eq 'Running' }
Get-WmiObject Win32_Service | Where-Object { $_.StartMode -eq 'Auto' }
cls
Set-ExecutionPolicy RemoteSigned -Scope Process
Get-ChildItem -Recurse C:\Scripts\
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-ADGroupMember 'Domain Admins'
Get-NetFirewallProfile
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Copy-Item -Path C:\Temp\* -Destination Z:\Backup\
Get-EventLog -LogName Security -InstanceId 4624 -Newest 100
Get-SmbSession
Get-ADOrganizationalUnit -Filter *
Copy-Item -Path C:\Temp\* -Destination Z:\Backup\
Get-Credential
Get-ADGroup -Filter *
Get-WmiObject -Class Win32_Process | Where-Object { $_.Name -like '*spoolsv*' }
Get-HotFix -Id KB5005565
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-SmbSession
Get-ADComputer -Filter *
Get-ChildItem -Recurse C:\Scripts\
Get-Service -Name WinRM | Format-List *
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Restart-Service -Name 'WinRM'
New-Item -Path C:\Temp -ItemType Directory
Get-EventLog -LogName Security -InstanceId 4625 -Newest 50
Get-Service -Name WinRM | Format-List *
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-LocalGroupMember -Group 'Administrators'
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Get-ADUser -Filter 'Enabled -eq True'
New-Item -Path C:\Temp -ItemType Directory
Get-ADUser -Filter *
Get-EventLog -LogName Security -InstanceId 4624 -Newest 100
Get-HotFix | Sort-Object InstalledOn -Descending
New-PSDrive -Name Z -PSProvider FileSystem -Root \\DC01\SYSVOL
Get-ADUser -Filter *
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Get-ADServiceAccount -Filter *
Remove-Item C:\Temp\old_log.log -Force
Get-Process -Name powershell
Add-Content -Path C:\Scripts\deploy.ps1 -Value '# Deployment script updated'
Get-ADUser -Filter * -Properties * | Export-Csv -Path C:\Reports\Users.csv
New-Item -Path C:\Temp -ItemType Directory
Get-NetFirewallProfile
Get-ADServiceAccount -Filter *
Get-Acl -Path 'AD:\OU=BadOU,DC=novatech,DC=local'
Get-EventLog -LogName Security -After (Get-Date).AddDays(-30) | Export-Csv -Path C:\Reports\SecurityEvents.csv
Get-SmbShare
whoami
Get-Acl -Path 'AD:\OU=BadOU,DC=novatech,DC=local'
Get-NetIPAddress
Get-NetIPAddress
Get-Credential
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Test-Connection -ComputerName dc01.novatech.local
Get-NetFirewallProfile
Get-WmiObject Win32_Service | Where-Object { $_.StartMode -eq 'Auto' }
Set-ExecutionPolicy RemoteSigned -Scope Process
systeminfo
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Get-ADUser -Filter *
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Get-Service | Where-Object { $_.Status -eq 'Running' }
Copy-Item -Path C:\Temp\* -Destination Z:\Backup\
Disconnect-PSDrive Z
Get-ADGroupMember 'Domain Admins'
Get-Process | Where-Object { $_.CPU -gt 100 }
Get-Process | Where-Object { $_.CPU -gt 100 }
Get-NetIPAddress
klist
Get-EventLog -LogName Application -Newest 50
Get-Service | Where-Object { $_.Status -eq 'Running' }
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
cls
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Test-Connection -ComputerName dc01.novatech.local
systeminfo
Get-WmiObject Win32_OperatingSystem
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Get-NetFirewallProfile
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Get-Service | Where-Object { $_.Status -eq 'Running' }
Import-Module ActiveDirectory
Set-Location C:\Temp
Get-Service | Where-Object { $_.Status -eq 'Running' }
Get-ScheduledTask | Export-Csv -Path C:\Reports\ScheduledTasks.csv
Get-ChildItem -Recurse C:\Scripts\
Get-SmbShare
Get-ProcessMitigation -Name powershell.exe
Get-ADComputer -Filter *
Get-EventLog -LogName Security -InstanceId 4625 -Newest 50
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Import-Module ActiveDirectory
Get-LocalGroupMember -Group 'Administrators'
Get-ADComputer -Filter *
Get-HotFix -Id KB5005565
Disconnect-PSDrive Z
Get-NetFirewallRule | Where-Object { $_.Enabled -eq 'True' }
Get-ADPrincipalGroupMembership svc_backup
Get-EventLog -LogName Security -InstanceId 4625 -Newest 50
Set-ExecutionPolicy RemoteSigned -Scope Process
Get-HotFix -Id KB5005565
Get-SmbSession
Disconnect-PSDrive Z
Get-ADGroup -Filter *
Get-Process -Name powershell
