Category: Powershell

PowerShell’s Win32_PingStatus

Scripting With PowerShell’s Win32_PingStatus There are occasions when it’s useful to know whether a computer is online, or whether it’s unavailable.  Ping is the classic command to test the status of a ComputerName or IP address.  WMI (Windows Management Instrumentation) provides a class called Win32_PingStatus, which we are going to …

PowerShell WMI Win32ComputerSystem

Introduction to the WMI Class Win32ComputerSystem The WMI class Win32ComputerSystem contains useful properties such as PCSystemType and DomainRole.  We can use PowerShell to display information about these and other computer properties. Topics for PowerShell WMI Win32ComputerSystem Get-WmiObject Win32_ComputerSystem – Getting Started WMI Class and Get-Member WMI Win32ComputerSystem – Real Life …

Windows PowerShell Get-WmiObject Win32_service

Windows PowerShell Get-WmiObject Win32_service PowerShell provides two ways of scripting Windows services.  For lists of services I employ Get-WmiObject win32_service.  However, when I want to deal with a particular service I choose Get-Service followed by the name-of-service. Topics for PowerShell Get-WmiObject win32_service Our Mission Preliminary Check of the Properties with …

PowerShell NetSh

PowerShell NetSh Sometimes when you add 1 + 1 the result is greater than two.  What I really means is that NetSh will teach you about PowerShell, and PowerShell will help you get the most from NetSh.  As a bonus we are going to make sure the firewall is enabled. …

How to Setup PowerShell Remote

How to Setup Windows PowerShell Remote v 2.0 The ability to create a remote connection is the most important difference between PowerShell v 1.0 and 2.0.  However, setting up remoting for the first time, is one of the most difficult tasks in PowerShell, especially in non-domain environments.  But no worries, …

PowerShell Functions

Creating Windows PowerShell Functions This section is dedicated to creating our own PowerShell functions.  I hope that you will find the outcomes as rewarding, and the learning journey as interesting, as I did. Background My learning philosophy is to learn by doing.  My teaching philosophy is to provide examples, each …

WMI Win32_NetworkAdapter Class

WMI Class Win32_NetworkAdapter Win32_NetworkAdapter is one of 7 Windows Management Instrumentation (WMI) classes that provides access to your network card.  PowerShell can not only provide command-line access to the settings, but also show properties such as NetConnectionStatus which are not visible in the Control Panel, or to IpConfig. Topics for …