PowerShell Test-Path Tutorial

PowerShell provides the Test-Path cmdlet in order to check if the specified path exists. The Test-Path command returns boolean values like True and False. If the specified path exists the True value is returned. If the specified Path does not exist the False value is returned. Test Path The Test-Path command is used to check … Read more

Get Services On Remote Computers with PowerShell

PowerShell provides the Get-Service command in order to list or display services on Windows computers. The Get-Service command can be used to list services on remote computers. We should use the -ComputerName attribute by providing the computer names or IP addresses of the remote systems. Get Services on Remote Computers We can use the Get-Service … Read more

Get Service Memory Usage In PowerShell

Services are used to complete to provide services for different tasks. Like regular or user processes the services also process those that use CPU and memory. As the services generally run longer than a process they use memory and may require more memory which is not released over time even if there is no need … Read more

Get Service Startup Type Using PowerShell

Windows services may transition into different statusses in runtime. But when the system is restarted they have Service Startup Type that is used to set if the service will be started automtically or not after the Windows start. We can use different commands to get service startup type using the PowerShell command line interface. Windows … Read more

PowerShell Get-Service Status

Windows Services are used to provide different functionalies. There are native and 3r party services for different tasks like printing, wireless management, ftp server etc. Even services are generally degisned to run in some cases they can be stopped. PowerShell provides the Get-Service command in order to list services and related information with their status. … Read more

PowerShell Get-Service Tutorial

Operating systems heavily use services to provide different native and 3rd party services without any interruption. Windows PowerShell provides the Get-Service command in order to list Windows services. The Get-Service can be used to list, filter, or iterate over Windows services in an easy way. List All Services The Get-Service command can be used to … Read more

PowerShell Sleep (Start-Sleep) Command

PowerShell provides the Start-Sleep command in order to pause or sleep the PowerShell execution for a specified time. For example, we may want to wait 5 seconds to make a request to the remote server for periodic checks, etc. In this tutorial, we examine how to sleep or wait in PowerShell. Sleep For Seconds The … Read more

How To Set Environment Variable Using PowerShell?

Environment Variables are used to store simple information at the operating system level which can be consumed by operating system services, applications, etc. for information sharing. PowerShell provides the ability to list and set environment variables via the PowerShell command line interface. We can use PowerShell to set environment variables like path, AppData, os, etc. … Read more

PowerShell switch Statement

PowerShell provides the switch statement in order to make decisions between different conditions which is similar to the if..else statement. The switch statement consists of test values and different conditions which are checked in order. If some of the conditions are met the condition action is executed and the next condition is checked. switch Syntax … Read more

PowerShell Hashtable Tutorial

Hashtable is a very popular data type used to store key and value pairs. As a popular and useful data type, PowerShell supports the HashTable type natively. Hashtable key is used to identify the data and the value is the actual data to use. In this tutorial, we examine how to use the PowerShell hashtable. … Read more