PDQ.com mobilePDQ.com desktop
Support

Real World Applied PowerShell

Kris PowellKris Powell
·

Webcast: Real World Applied PowerShell

If you missed this week’s live webcast, well, you’re in luck! We have a recording available as well as some of the scripts used in this webcast for your copy+paste pleasure.

Clearing Event Logs

# This will clear a single log
Clear-EventLog -Log Application, System
# This will clear all the logs
Get-EventLog -List | Foreach-Object {Clear-EventLog -Log $_.Log}

Note: The Get-EventLog cmdlet only grabs the classic Event Log logs. If you need to view all the windows logs, including the more modern logs in modern OSes, you may wish to use the Get-WinEvent cmdlet.To see the difference, compare:

Get-EventLog -List

with

GetWinEvent -ListLog *

DISM

Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient

In this video…

PowerShell improvements – 1:46

Package Library installing PowerShell 5 – 2:42

Is it worth upgrading all my clients to Win 10 for PS5? – 4:51

Common tasks for administrators / Batch vs PowerShell – 6:13

Clearing event logs using cmd – 7:02

Clearing event logs using PowerShell – 8:09

Can I upgrade from PS2 to PS5 in Win7, or do I need to install PS3 then PS4, then PS5? –10:26

Making PowerShell scripts silent with PDQ Deploy – 13:08

Enabling and disabling Windows features using DISM- 16:34

Enabling and disabling Windows features using PowerShell – 17:20

Should I use PowerShell to set (not force) a users default ‘open with’ program, or would a group policy be better? – 23:35

PS5 (Win 10) has an Execution Policy Change that prevents security risks from running scripts. How do you bypass this without having to press [A] – yes to all? – 25:06

Don't miss the next post!

Using PowerShell to Install Printers

When installing printers, we will need to do the four things; Add Driver to the Store, Install the Driver, Create Printer Port, and Install the Printer