<< < 8 9 10 11 12 13   Sort: Date

Managing Windows PowerShell Background Jobs
Where to find tutorials on managing Windows PowerShell background jobs? Here is a collection of tutorials compiled by FYIcenter.com team on managing Windows PowerShell background jobs. What Is Windows PowerShell Background Job "Start-Job" Cmdlet in Windows PowerShell "Get-Job" Cmdlet in Windows Powe...
2016-10-13, 1665🔥, 0💬

Use NUL to Sink Program Output
How to use the NUL file name to sink program output? If a program is writing too much out on your screen, you sink all output to the NUL file name. For example, if you run JMeter program, it will write some output on your screen: C:\&gt;\fyicenter\jmeter\b in\jmeter&gt; nul =================...
2021-04-15, 1663🔥, 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, 1662🔥, 0💬

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, 1650🔥, 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, 1650🔥, 0💬

What Are Batch Parameters
What Are Batch Parameters? Batch parameters are parameters received from the command line where the batch file is invoked. There are total of 11 batch parameters supported a batch file using the "%n" format: %0 - The file name of this batch file. %1, %2, %3, ..., %9 - The first, second, third, ..., ...
2022-04-13, 1641🔥, 0💬

List Batch Commands
What are build-in commands designed to be used in batch files? Here is a list of built-in commands designed to be used in batch files: Call - Calls and runs another batch file or program. When the other batch file or program ends, continue to run this this batch file. Echo - Displays messages, or tu...
2021-03-21, 1632🔥, 0💬

Application Command in Pipeline in Windows PowerShell
Can I use application commands in cmdlet pipeline in Windows PowerShell? Yes, you can use application commands in cmdlet pipeline in Windows PowerShell. But you need to remember a couple of things: 1. The output of an application command will be considered as a String object, not a sequence of chara...
2016-11-04, 1622🔥, 0💬

Object Type Match in Pipeline in Windows PowerShell
What will happen if the output object type does not match the input object type in a cmdlet pipeline in Windows PowerShell? When you build a cmdlet pipeline, you have to make sure that object types are compatible in the pipeline operation. In other words, the output object type from the previous cmd...
2016-11-04, 1615🔥, 0💬

Multiple Quotations in a Single Parameter
Can I have multiple quotations in a single parameter for a batch file? Yes, you can put multiple quotations in a single parameter for a batch file. Quotations also be started and ended anywhere in the parameter. Here are some examples on using quotations in a single parameter: C:\fyicenter&gt;Pa...
2021-11-12, 1610🔥, 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, 1594🔥, 0💬

"if" - Run Command Conditionally
What is the "if" batch command for? The "if" command is for running a command conditionally. Below is the "if" command syntax: if condition command1 [else command2] When the "if" command is executed, the specified condition will be evaluated first. If the condition is true, "command1" will be execut...
2021-04-02, 1586🔥, 0💬

"for" Command Help Reference
How to get "for" command help reference? You can run the "for /?" command to get "for" command help reference as shown below: C:\fyicenter&gt;for /? Runs a specified command for each file in a set of files. FOR %variable IN (set) DO command [command-parameters] %variable Specifies a single lette...
2021-08-01, 1572🔥, 0💬

String Replacement in Windows PowerShell
How to replace a part of a string in Windows PowerShell? You can use the "-Replace" operation to replace a part of a string in Windows PowerShell. Here is the syntax of the "-Replace" operation: $subject -Replace $pattern,$replacement Regular expression is supported in $pattern. Here are some good e...
2016-10-19, 1570🔥, 0💬

Batch Command Help Reference Documents
Where to find introduction information on Batch Command Help Reference Documents? Here is a collection of tutorials compiled by FYIcenter.com team to provide introduction information on Batch Command Help Reference Documents. "call" Command Help Reference "copy" Command Help Reference "del" Command ...
2021-10-10, 1555🔥, 0💬

Special File Names Used by Windows
What are special file names used by Windows? Windows used a number of special file names referring to special resources in the system: CON - Referring to the console: keyboard and screen. Reading from CON is reading from the keyboard. Writing to CON is writing to the screen. PRN - Referring to the p...
2021-04-15, 1554🔥, 0💬

File Name with or without File Extension
Should I provide file name with or without File Extension? To provide file name with or without file extension is really depending on the program that you are providing the file to. Here are some examples on different programs behaving differently on file names with and without file extension. 1. Wi...
2021-04-15, 1547🔥, 0💬

Input and Output Stream Handler Numbers
What are input and output stream handler numbers? Input and output stream handler numbers are integers assigned to represent input and output streams. The list below shows you how handler numbers are assigned to different input and output streams: Handler Number Stream 0 STDIN 1 STDOUT 2 STDERR 3 To...
2021-05-15, 1543🔥, 0💬

Expression Expansion in Strings in Windows PowerShell
What is expression expansion in strings in Windows PowerShell? Expression expansion in strings is a short-hand of string concatenation operations using the following syntax rule: When an expression enclosed in parentheses following a $ sign is included in a double-quoted string literal like "... $(e...
2016-10-19, 1540🔥, 0💬

Wildcard Character In File Names
What are wildcard characters in file names? wildcard characters in file names are special characters that Windows will them as match patterns to search for files. If any matches found, the given file name will be replaced with matched file names. Many Windows commands support two wildcard characters...
2021-04-15, 1506🔥, 0💬

String Variable Match and Replace
How to perform sub-string match and replacement in a string batch variable? You can perform a sub-string match and replacement in a string batch variable using the following variable modifier: %variable:pattern=str% Wildcard character "*" can be used in "pattern" to match any number of any character...
2021-10-10, 1497🔥, 0💬

Get Sub-String from Variable
How to get a sub-string from a string batch variable? You can get a sub-string from a string batch variable using the following variable modifier: %variable~i,l% In the above expression, "i" is the offset position of the sub-string to be extracted, and "l" is the length of the sub-string to be extra...
2021-10-10, 1463🔥, 0💬

Run Second Command If the First Fails
How to run two commands with a condition that the second one will run only if the first one fails? You can run two commands with a condition that the second one will run only if the first one fails with the syntax below: command-1 || command-2 For example, if you want to write a message to the scree...
2022-08-26, 1446🔥, 0💬

Pipe STDOUT of Previous Command as STDIN of Next
How to redirect (or pipe) STDOUT stream from the first command as STDIN stream of the next command? If you want to pipe two commands together by redirecting the STDOUT stream of the first command as the STDIN stream of the second command, you can use the pipe redirection operator "|" as shown below:...
2021-05-15, 1443🔥, 0💬

<< < 8 9 10 11 12 13   Sort: Date