CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Author : David

PowerShell – How to create temporary files?

Yet times, we need to create temporary files in PowerShell scripts to store the temporary data for the program’s needs. These files are created in the temporary folder which was set in the Operating System configuration. PowerShell provides New-TemporaryFile cmdlet to do the job for us to create a temporary file(s) through the scripts. Create […]

PowerShell – How to get network adapter details?

PowerShell provides a bunch of cmdlets through the NetAdapter module to manage network adapters. Through this article, we are going to discuss how we get the network adapter details, properties, etc, using PowerShell cmdlet(s). Get-NetAdapter is to get the details/properties of the network adapter. The below command shows the basic details of the network adapter. PS […]

PowerShell – How to unzip files?

In our previous article, we have discussed about zip / compress the selected files or directories using PowerShell Compress-Archive cmdlet. Through this article, we are going to discuss how to unzip the zipped files. Expand-Archive cmdlet – Unzip files from Archived file(s) PowerShell provides Expand-Archive cmdlet to unzip the zipped files. Through its -Path argument […]

Powershell – How to zip / compress / archive selected files or directories?

Windows PowerShell provides commands to zip (compress) and unzip the files. Through this article, we are going to discuss the PowerShell command to zip the selected files or directories. Compress-Archive cmdlet – Compress / Zip / Archive the selected files or directories PowerShell provides Compress-Archive cmdlet, to archive the specified files or directories. We can […]

PowerShell – Containment operators

PowerShell containment operators are used to verify whether the given value is available in the given input values. These operators always return the boolean value; True or False. Below are the containment operators PowerShell provides, and these take 2 or more operands; left-side operands hold the input value and the right-side operand is for the […]

PowerShell – Operator Precedence

We use Arithmetic Operators in the expressions to calculate numeric values. PowerShell processes these expressions from left to right, and depending on the order of precedence expressions are evaluated. Operators who have higher precedence will evaluate first. To understand operator precedence, let’s take a simple arithmetic expression; 3+4/7*10-2%3+20 When we evaluate the above expression from […]

PowerShell – Exception handling

PowerShell provides exception handling mechanism to enable to deal with the exceptions raised during the script execution. Known or expected errors, we commonly handle using Error handling mechanism; where mostly we use if statement to meet certain criteria and the change the flow of execution depends on the result of the conditional statement. Exceptional handling […]

Scroll to top