This is another tutorial about PowerShell and Windows 8.1 operating system.
You can try with another Windows OS version and PowerShell.
The first issue is to show all active services on your computer:
1 | Get-Service | Where-Object {$_.Status -eq “Running”} |
This will show all event logs on your computer:
1 | Get-EventLog -List |
More info about restricted execution policy that prevents scripting on PowerShell, see:
1 | Get-ExecutionPolicy |
You can use the four options to choose with:
1 | Set-ExecutionPolicy |
- Restricted – The default execution policy that stops scripts from running.
- All Signed – Will run scripts if they are signed by a trusted publisher
- Remote Signed – Allows scripts to run which have been created locally
- Unrestricted – A policy with no restrictions on running scripts
The Clear-Host function removes all text from the current display, including commands and output that might have accumulated, alias command – CLS, see:
1 | Clear-Host |
Use with admin shell and the PowerShell command named Clear-EventLog to clear all your logs:
1 | Get-EventLog -list | foreach {$_.log} | foreach {Clear-EventLog -logname $_} |