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

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, 211👍, 0💬

Logical Operations in Windows PowerShell Scripts
How to use logical (or Boolean) operations in Windows PowerShell scripts? Can I write "$a > 0 AND $a < 10"? No, you can not use "$a > 0 AND $a < 10" as a logical operation in Windows PowerShell scripts. You must use PowerShell logical operators given below: -and Logical AND -or Logical O...
2016-10-30, 178👍, 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, 177👍, 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, 175👍, 0💬

Comparison Operations in Windows PowerShell Scripts
How to use comparison operations in Windows PowerShell scripts? Can I write "$a > 0"? No, you can not use "$a>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 Greater than ...
2016-10-30, 168👍, 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, 197👍, 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, 192👍, 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, 178👍, 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, 176👍, 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, 171👍, 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, 213👍, 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, 196👍, 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, 185👍, 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, 175👍, 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, 174👍, 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, 1602👍, 0💬

Background Tasks Infrastructure Service (BrokerInfrastructure) on Windows Server 2012
What is the "Background Tasks Infrastructure Service (BrokerInfrastructure)" system service on Windows Server 2012? Can I disable "Background Tasks Infrastructure Service"? "Background Tasks Infrastructure Service (BrokerInfrastructure)" is a Windows Server 2012 service that controls which backgroun...
2016-10-26, 969👍, 0💬

Certificate Propagation (CertPropSvc) Service on Windows Server 2012
What is the "Certificate Propagation (CertPropSvc)" system service on Windows Server 2012? Can I disable "Certificate Propagation"? "Certificate Propagation (CertPropSvc)" is a Windows Server 2012 service that copies user certificates and root certificates from smart cards into the current user's ce...
2016-10-26, 625👍, 0💬

Base Filtering Engine (BFE) Service on Windows Server 2012
What is the "Base Filtering Engine (BFE)" system service on Windows Server 2012? Can I disable "Base Filtering Engine"? "Base Filtering Engine (BFE)" is a Windows Server 2012 service that manages firewall and Internet Protocol security (IPsec) policies and implements user mode filtering. Stopping or...
2016-10-26, 390👍, 0💬

Background Intelligent Transfer Service (BITS) Service on Windows Server 2012
What is the "Background Intelligent Transfer Service (BITS)" system service on Windows Server 2012? Can I disable "Background Intelligent Transfer Service"? "Background Intelligent Transfer Service (BITS)" is a Windows Server 2012 service that transfers files in the background using idle network ban...
2016-10-26, 351👍, 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, 218👍, 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, 214👍, 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, 201👍, 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, 201👍, 0💬

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