PowerShell Get-Childitem -Include
PowerShell GCI -Include Parameter My advice is to avoid the -Include parameter. If you want to filter the output then use the -Filter parameter! The problem with -Include is that it doesn’t do what you think. In the case of Get-ChildItem, -Include operates on the path and not on the …
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 …
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 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 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. …
Windows PowerShell 2.0 Cmdlets PowerShell 1.0 has about 125 cmdlets, whereas v 2.0 has a minimum of 230. The precise number depends on whether you are running Windows 8, 7, or XP. PowerShell ISE (Integrated Scripting GUI) makes scripting easier. Remoting is the killer new feature of version 2.0 Background …
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 …