<< < 1 2 3 4 5 6 7 8 9 10 11 > >>   Sort: Rank

Assign Object to Variable in Windows PowerShell Scripts
How to assign an object to a variable in Windows PowerShell scripts? The output object of a cmdlet can be assigned to a variable using the assignment operator "=". Remember, variable names must start with the "$" sign. So here is an example of assign a DateTime object to a variable: $now = Get-Date ...
2016-11-02, 1644🔥, 0💬

Out-Host - Standard Output in Windows PowerShell Scripts
How to use the "Out-Host" cmdlet in Windows PowerShell scripts? I want to output information the standard output channel. The "Out-Host" cmdlet sends output to the Windows PowerShell host for display. The host displays the output to the PowerShell console. Because "Out-Host" is the default cmdlet, y...
2016-10-30, 2457🔥, 0💬

Console Input and Output in Windows PowerShell Scripts
How to manage console input and output in Windows PowerShell scripts? I want to write a PowerShell script that "talks" with the user. You need to use the "Write-Host" and "Read-Host" cmdlets to manage console input and output. The "Write-Host" cmdlet allows to write information to the console with s...
2016-10-30, 1713🔥, 0💬

If-Else Conditions in Windows PowerShell Scripts
How to use if-else conditions in Windows PowerShell scripts? PowerShell script supports the following if-else code block to help you to perform tasks depending on logical conditions: If (conditin1) { task1 } Elseif (condition2) { task2 ... } Else { other-task } Here is a sample script on how to use ...
2016-10-30, 1701🔥, 0💬

Logical Operations in Windows PowerShell Scripts
How to use logical (or Boolean) operations in Windows PowerShell scripts? Can I write "$a &gt; 0 AND $a &lt; 10"? No, you can not use "$a &gt; 0 AND $a &lt; 10" as a logical operation in Windows PowerShell scripts. You must use PowerShell logical operators given below: -and Logical A...
2016-10-30, 1692🔥, 0💬

Comparison Operations in Windows PowerShell Scripts
How to use comparison operations in Windows PowerShell scripts? Can I write "$a &gt; 0"? No, you can not use "$a&gt;0" as a comparison operation in Windows PowerShell scripts. You must use PowerShell comparisonoperators given below: -eq Equal -ne Not equal -ge Greater than or equal -gt Great...
2016-10-30, 1645🔥, 0💬

Loop Hashtable Members in Windows PowerShell Scripts
How to use Foreach loops in Windows PowerShell scripts? There are a couple of ways of loop through members of a hashtable. 1. Using "Keys" property - The "Keys" property holds a Collection object of all keys in a hashtable. The Collection object of keys can be used in a "Foreach {...}" loop as shown...
2016-10-29, 3160🔥, 0💬

Array in Windows PowerShell Scripts
What is an array in Windows PowerShell scripts? An array in Windows PowerShell is a simple data structure where pieces of data are stored in as elements in the structure in an ordered sequence. In an array, each element can be identified by the sequence index. You can create an array of objects by l...
2016-10-29, 1792🔥, 0💬

Loop Array Elements in Windows PowerShell Scripts
How to loop through all elements in an array in Windows PowerShell scripts? An array has a special property called "Length", which holds the length of the array or the number of members in the array. The "Length" property can help you to loop through all members using a simple "For {...}" loop as sh...
2016-10-29, 1675🔥, 0💬

Execution Loops in Windows PowerShell Scripts
How to write execution loops in Windows PowerShell scripts? I want to repeat some code multiple times. There are several ways to write execution loops in Windows PowerShell scripts. 1. "While {...}" loop - For example: $today = Get-Date "Today is "+$today.DayOfWeek $next = $today.AddDays(1) While ($...
2016-10-29, 1653🔥, 0💬

Hashtable in Windows PowerShell Scripts
What is a hashtables of objects in Windows PowerShell scripts? A hashtables in Windows PowerShell is a data structure where pieces of data are stored in the structure as key-value members. The value of a member represents the data, and the key of a member provides a name for the data. Hashtable keys...
2016-10-29, 1585🔥, 0💬

Work with File System in Windows PowerShell
Where to find tutorials on how to work with file systems in Windows PowerShell? Here is a collection of tutorials compiled by FYIcenter.com team on working with file systems in Windows PowerShell. What Is File System in Windows PowerShell Get and Change Directory in Windows PowerShell Get Directory ...
2016-10-27, 2081🔥, 0💬

Get and Change Directory in Windows PowerShell
How to get and change the current directory of the file system in Windows PowerShell? You can use the following cmdlets to get or change the current directory in a file system: "Get-Location" cmdlet (or "pwd" alias) returns an object that represents the current directory, much like the pwd (print wo...
2016-10-27, 1875🔥, 0💬

Execution Status and Errors in Windows PowerShell Scripts
How to check execution status and errors in Windows PowerShell scripts? PowerShell provides 2 automatic variables to help you checking execution status and errors: 1. $? variable - The $? variable contains the execution status of the last operation. It contains TRUE if the last operation succeeded a...
2016-10-27, 1845🔥, 0💬

Run Script with Arguments in Windows PowerShell
How to write a script that take argument from the command line in Windows PowerShell? You can use the automatic variable $Args to take arguments from the command line where the script is launched. The $Args variable contains an array of all argument provided at the command line where this script was...
2016-10-27, 1817🔥, 0💬

What Is File System in Windows PowerShell
What is a file system from the Windows PowerShell point of view? A file system represents a logical tree of directories and files to store information on an device outside the computer CPU. For example, a hard disk drive can be considered as a filesystem. There are several interesting features suppo...
2016-10-27, 1809🔥, 0💬

Windows PowerShell Tutorials
Where to find tutorials on using Windows PowerShell? I want to learn everything about Windows PowerShell. Here is a collection of tutorials about Windows PowerShell compiled by FYIcenter.com team. Introduction of Windows PowerShell What Is Windows PowerShell Main Features of Windows PowerShell Diffe...
2016-10-26, 95531🔥, 0💬

Create Directory in Windows PowerShell
How to create a directory in Windows PowerShell? Can I use the old "mkdir" command? Yes, you can still use the old "mkdir" command in Windows PowerShell. But "mkdir" is defined as an alias of the "New-Item" cmdlet. The "New-Item" cmdlet creates a new directory or file. The "New-Item" cmdlet requires...
2016-10-24, 10011🔥, 0💬

Move Directory or File in Windows PowerShell
How to move a directory or file to a new location in Windows PowerShell? Can I use the old "move" command? Yes, you can still use the old "move" command in Windows PowerShell. But "move" is defined as an alias of the "Move-Item" cmdlet. The "Move-Item" cmdlet moves an item, including its properties,...
2016-10-24, 2831🔥, 0💬

Get Directory Entries in Windows PowerShell
How to get a list of files in a directory in Windows PowerShell? Can I use the old "dir" command? Yes, you can still use the old "dir" command in Windows PowerShell. But "dir" is defined as an alias of the "Get-ChildItem" cmdlet. The "Get-ChildItem" cmdlet gets the items in the current directory by ...
2016-10-24, 2457🔥, 0💬

Copy Directory or File in Windows PowerShell
How to copy a directory or file to a new location in Windows PowerShell? Can I use the old "copy" command? Yes, you can still use the old "copy" command in Windows PowerShell. But "copy" is defined as an alias of the "Copy-Item" cmdlet. The Copy-Item cmdlet copies an item from one location to anothe...
2016-10-24, 1940🔥, 0💬

Rename Directory or File in Windows PowerShell
How to rename a directory or file in Windows PowerShell? Can I use the old "ren" command? Yes, you can still use the old "ren" command in Windows PowerShell. But "ren" is defined as an alias of the "Rename-Item" cmdlet. The "Rename-Item" cmdlet changes the name of a specified item, for example a dir...
2016-10-24, 1776🔥, 0💬

Creating PowerPoint Show Files
How to create a PowerPoint show file? I want to create a show file from a PowerPoint 2007 presentation file, so that I can give the show file to my friends to view it in show mode. Can I do this with PowerPoint 2007? Yes, you can easily create a show file from a presentation file with PowerPoint 200...
2016-10-23, 5148🔥, 0💬

Get File Properties in Windows PowerShell
How to get file properties in Windows PowerShell? I want to know when the file was originally created. If you want to get all properties of a file in Windows PowerShell, you can use the "Get-Item ... | Select-Object -Property *" pipeline. Here is good example of getting file properties in Windows Po...
2016-10-22, 25551🔥, 0💬

<< < 1 2 3 4 5 6 7 8 9 10 11 > >>   Sort: Rank