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