Get-Service | Where-Object { $_.Status -eq 'Running' }
Disconnect-PSDrive Z
klist
Get-EventLog -LogName Security -InstanceId 4624 -Newest 100
Get-ADUser svc_backup -Properties lastLogonTimestamp
cls
Get-EventLog -LogName Application -Newest 50
Get-Content C:\Scripts\deploy.ps1
Get-WmiObject Win32_Service | Where-Object { $_.StartMode -eq 'Auto' }
Get-Acl -Path 'AD:\OU=BadOU,DC=novatech,DC=local'
Get-ADServiceAccount -Filter *
Get-ADPrincipalGroupMembership svc_backup
Get-ADServiceAccount -Filter * -Properties *
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Get-NetFirewallRule | Where-Object { $_.Enabled -eq 'True' }
Get-ADGroupMember -Identity 'Domain Admins' -Recursive
Get-HotFix | Sort-Object InstalledOn -Descending
Get-LocalGroupMember -Group 'Administrators'
Get-ADUser -Filter * -Properties PasswordLastSet | Where-Object { $_.PasswordLastSet -lt (Get-Date).AddDays(-180) }
Get-ADServiceAccount gmsa_finance -Properties msDS-ManagedAccountPrecededByLink,msDS-DelegatedMSAState
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Get-Service | Where-Object { $_.Name -like '*crypt*' }
Get-Content C:\Scripts\deploy.ps1
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Remove-Item C:\Temp\old_log.log -Force
Get-ADUser -Filter *
Get-Process -Name powershell
Get-Command -Module ActiveDirectory
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-HotFix -Id KB5005565
Get-ADServiceAccount gmsa_finance -Properties *
Get-ADServiceAccount gmsa_sales -Properties *
Get-Content C:\Users\svc_backup\AppData\Local\Temp\deploy.log
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
New-Item -Path C:\Temp -ItemType Directory
Get-EventLog -LogName System -Newest 50
systeminfo
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Get-Service | Where-Object { $_.Status -eq 'Running' }
Get-ADUser -Filter * -Properties LastLogonDate | Where-Object { $_.LastLogonDate -lt (Get-Date).AddDays(-90) }
Set-ExecutionPolicy RemoteSigned -Scope Process
Test-Connection -ComputerName dc01.novatech.local
Get-WinEvent -FilterHashtable @{LogName='Security';ID=4624} -MaxEvents 500
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Start-Sleep -Seconds 10
Get-ADGroupMember 'Domain Admins'
Get-Content C:\Scripts\deploy.ps1
Get-ADOrganizationalUnit -Filter *
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Get-WmiObject Win32_Service | Where-Object { $_.StartMode -eq 'Auto' }
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-ADObject -LDAPFilter '(objectCategory=computer)'
cls
Get-EventLog -LogName Security -InstanceId 4624 -Newest 100
Get-CimInstance -ClassName Win32_QuickFixEngineering
Export-Csv -Path C:\Reports\ADUsers_$(Get-Date -Format 'yyyyMMdd').csv -NoTypeInformation
Get-ADGroupMember 'Domain Admins'
Get-ADServiceAccount gmsa_hr -Properties *
Get-HotFix -Id KB5005565
Get-WmiObject Win32_Service | Where-Object { $_.StartMode -eq 'Auto' }
Remove-Item C:\Temp\old_log.log -Force
Get-Content C:\Users\svc_backup\AppData\Local\Temp\deploy.log
Get-ADServiceAccount gmsa_it -Properties *
Get-Acl -Path 'AD:\OU=BadOU,DC=novatech,DC=local'
Get-Process -Name powershell
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
cls
Get-Content C:\Scripts\deploy.ps1
Test-Connection -ComputerName dc01.novatech.local
Set-ExecutionPolicy RemoteSigned -Scope Process
Set-ExecutionPolicy RemoteSigned -Scope Process
Get-Service | Where-Object { $_.Status -eq 'Running' }
Get-ADGroupMember -Identity 'Enterprise Admins' -Recursive
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-Credential
Get-ProcessMitigation -Name powershell.exe
Test-Connection -ComputerName dc01.novatech.local
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-NetIPAddress
Get-ADUser -Filter *
Get-ADComputer -Filter *
Remove-Item C:\Temp\old_log.log -Force
Get-ADGroup -Filter *
Get-NetFirewallProfile
Get-ADComputer -Filter *
Get-WmiObject Win32_OperatingSystem
Get-Service | Where-Object { $_.Name -like '*crypt*' }
New-Item -Path C:\Temp -ItemType Directory
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Copy-Item -Path C:\Temp\* -Destination Z:\Backup\
Get-WmiObject Win32_OperatingSystem
Get-SmbShare
Get-ADOrganizationalUnit -Filter *
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
systeminfo
Get-WinEvent -FilterHashtable @{LogName='Security';ID=4625} -MaxEvents 1000
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-ADServiceAccount -Filter * | Select-Object Name,Enabled,Created
Import-Module ActiveDirectory
Get-NetIPAddress
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
New-PSDrive -Name Z -PSProvider FileSystem -Root \\DC01\SYSVOL
hostname
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-ADUser -Filter 'Enabled -eq True'
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
systeminfo
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-HotFix | Sort-Object InstalledOn -Descending
Remove-Item C:\Temp\old_log.log -Force
Remove-Item C:\Temp\old_log.log -Force
hostname
