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

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, 357👍, 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, 347👍, 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, 312👍, 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, 385👍, 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, 368👍, 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, 360👍, 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, 348👍, 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, 328👍, 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, 406👍, 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, 363👍, 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, 346👍, 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, 344👍, 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 harddisk drive can be considered as a filesystem. There are several interesting features suppor...
2016-10-27, 339👍, 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, 3487👍, 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, 464👍, 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, 416👍, 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, 403👍, 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, 380👍, 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, 362👍, 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, 4547👍, 0💬

Get File Content in Windows PowerShell
How to get the content of a file in Windows PowerShell? You can use the "Get-Content" cmdlet to get the content of a file in Windows PowerShell. "Get-Content" cmdlet gets the content of the item at the location specified by the path, such as the text in a file. It reads the content one line at a tim...
2016-10-22, 382👍, 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, 381👍, 0💬

Delete Directory or File in Windows PowerShell
How to delete a directory or file to a new location in Windows PowerShell? Can I use the old "del" command? Yes, you can still use the old "del" command in Windows PowerShell. But "del" is defined as an alias of the "Remove-Item" cmdlet. The "Remove-Item" cmdlet deletes one or more items, like direc...
2016-10-22, 355👍, 0💬

Get Directory Properties in Windows PowerShell
How to get directory properties in Windows PowerShell? I want to know how many files are there in a directory. If you want to get measurement properties of a directory in Windows PowerShell like total file size, you can use the "Get-ChildItem ... -Recurse | Measure-Object -Sum Length" pipeline. Here...
2016-10-22, 326👍, 0💬

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