- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Chirag Nagrekar has Published 465 Articles
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
9K+ Views
There are two ways to use the foreach loop parallelly in PowerShell.Using Foreach-Object -Parallel command (Supports in PowerShell 7.0 or above)Using Foreach -Parallel in Workflow (Supports PowerShell 5.1 or below)Suppose we have Servers.txt and which contains 10 Servers. When we use the Parallel for loop, it isn’t guaranteed which server ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
366 Views
PowerShell workflow is built on the .Net based Windows Workflow Foundation (WWF) and it has a separate Workflow engine to execute the code because it translates code into XAML for the WWF framework.PowerShell workflow is series of steps that is mainly used forRunning activities parallelly on more than one machine.Long-running ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
2K+ Views
To validate the IP address using PowerShell, we can use several methods as shown below.Using RegEx method.Using Typecasting method.Using TypeCasting method.In this method, we are using System.Net method class IPAddress to validate the IP address.[ipaddress]$IP = "192.168.0.1"The above one is valid. Let’s check what $IP stores in.PS C:\> $IP ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
1K+ Views
To check if the PowerShell string contains a specific word, we can use the string method Contains(). For example, ExamplePS C:\> $str = 'TestNZ01LT' PS C:\> $str.Contains('NZ') TrueNow the funny thing is, even if the PowerShell is case-Insensitive, the above command is not. We need to provide the exact substring. ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
2K+ Views
To convert any command output to the hashtable in PowerShell, we can first convert the output to the JSON format using the ConvertTo-JSON command, and applying the ConvertFrom-JSON command from the first output will produce an output to the Hashtable.ExampleGet-ServiceThe above command will give the output in the array format.OutputStatus ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
3K+ Views
When we write Invoke-Command in PowerShell, sometimes we get the RunSpaceID property in PowerShell. This is because we use Select-Object (alias: Select) command inside the scriptblock. For example, ExampleInvoke-Command -ComputerName LabMachine2k12 -ScriptBlock{Get-Process PowerShell | Select Name, CPU, WorkingSet}OutputName : powershell CPU ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
815 Views
When we are working with Invoke-Command, we get the PSComputerName extra field in the output table. You can remove it by using -HideComputerName parameter. For example, the Below command gives the output with the PSComputerName property.ExampleInvoke-Command -ComputerName LabMachine2k12 -ScriptBlock{Get-Service Winrm} | ft -AutoSizeOutputStatus Name DisplayName ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
4K+ Views
To find the device driver version using PowerShell, we need to use the class win32_PnpSignedDriver of the WMI object. For example, ExampleGet-WmiObject win32_PnpSignedDriverOr if you are using PowerShell core (PowerShell 6.0 or later), you can use the CIM Instance command. For example, Get-CimInstance win32_PnpSignedDriverTo filter out the Drivers against their ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
3K+ Views
To get the particular windows certificate expiry date from the particular store, we first need the full path of that certificate along with a thumbprint. If the thumbprint is not known to you, we can use the friendly name.With the thumbprint, Get-ChildItem Cert:\LocalMachine\root\0563B8630D62D75 | fl *When you run the above ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
34K+ Views
We know that the Windows Certificates are resided in the Certificate store but finding the certificate with its name or getting particular certificate details might be cumbersome sometimes.You can access the certificate store using MMC or using CertMgr.msc command. There are certificates stored for CurrentUser, ServiceAccount, and Local Computer. To ... Read More