Databases Reference
In-Depth Information
Select-Object cmdlet: Gets only the specified properties of an object or set of objects. It can also select
unique objects from an array of objects or it can select a specified number of objects from the beginning
or end of an array of objects. If you use Select-Object to select specified properties, it copies the values
of those properties from the input objects and creates new objects that have the specified properties and
copied values. Use the Property parameter to specify the properties you want to select. Alternately, use
the First, Last, Unique, Skip ,and Index parameters to select particular objects from an array of input
objects. For more specific object filtering, use the Where-Object cmdlet. You can also use Select-Object
to add calculated properties to an object. To add a calculated property, use the Property parameter and
type a hash table for the parameter value. Create an Expression key in the hash table and assign to the
key an expression that calculates a value. The hash table can also have a Name key.
Select-String cmdlet: Searches for text and text patterns in input strings and files. You can use
it like Grep in UNIX, and Findstr in Windows. Select-String is based on lines of text. By default,
Select-String finds the first match in each line and, for each match, it displays the filename, line
number, and all text in the line containing the match. However, you can direct it to detect multiple
matches per line, display text before and after the match, or display only a Boolean (true or false) that
indicates whether a match is found. Select-String uses regular expression matching, but it can also
perform a simple match that searches the input for the text that you specify. Select-String can display
all of the text matches or stop after the first match in each input file. It can also display all text that does
not match the specified pattern, You can also specify that Select-String expect a particular character
encoding, such as when searching files of Unicode text.
Send-MailMessage cmdlet: Sends an e-mail message from within Windows PowerShell.
Set-Alias cmdlet: Creates or changes an alias (alternate name) for a cmdlet or for a command element,
such as a function, a script, a file, or other executable. You can also use Set-Alias to reassign a current
alias to a new command, or to change any of the properties of an alias, such as its description. Unless you
add the alias to the Windows PowerShell profile, changes to an alias are lost when you exit the session or
close Windows PowerShell.
Set-Date cmdlet: Changes the system date and time on the computer to a date and time that you specify.
You can specify a new date and/or time by typing a string or by passing a DateTime or TimeSpan object
to Set-Date . To specify a new date or time, use the Date parameter. To specify a change interval, use the
Adjust parameter.
Set-PSBreakpoint cmdlet: Sets a breakpoint in a script or in any command run in the current session.
You can use Set-PSBreakpoint to set a breakpoint before executing a script or running a command, or
during debugging, when stopped at another breakpoint. Note : Set-PSBreakpoint cannotsetabreakpoint
on a remote computer. To debug a script on a remote computer, copy the script to the local computer and
then debug it locally. Each Set-PSBreakpoint command creates one of the following three types of
breakpoints:
Line breakpoint — Sets breakpoints at particular line and column coordinates
Command breakpoint — Sets breakpoints on commands and functions
Variable breakpoint — Sets breakpoints on variables
You can set a breakpoint on multiple lines, commands, or variables in a single Set-PSBreakpoint
command, but each Set-PSBreakpoint command sets only one type of breakpoint. At a breakpoint,
Windows PowerShell temporarily stops executing and gives control to the debugger. The command
Search WWH ::




Custom Search