IT tutorials
 
Technology
 

PowerShell for Microsoft SharePoint 2010 : Type Operators

12/10/2013 2:18:27 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
The type operators are used to find or change the type of an object in Windows PowerShell. Table 1 lists the type operators available.
Table 1. Windows PowerShell Type Operators
OperatorDescription
-isChecks if an object is a specified type
-isnotChecks if an object is not a specified type
-asConverts an object to a specified type

You can test if an object is a specific type by using the -is operator.

PS > "Hello" -is [System.String]
True
PS > "Hello" -is [System.Int32]
False

In the first example, we check if "Hello" is of the type System.String, which returns True. In the second example, we check if "Hello" is of the type System.Int32, which returns False.

To make sure that an object is not a specific type, use the -isnot operator.

PS > "Hello" -isnot [System.String]
False
PS > "Hello" -isnot [System.Int32]
True

You can convert objects to a specified type using the -as operator.

PS > 1.123 -as [System.Int32]
1

In this example, we convert the numeric value 1.123 to an object of the type System.Int32.

 
Others
 
- PowerShell for Microsoft SharePoint 2010 : Redirection Operators
- PowerShell for Microsoft SharePoint 2010 : Logical Operators
- PowerShell for Microsoft SharePoint 2010 : Comparison Operators
- PowerShell for Microsoft SharePoint 2010 : Assignment Operators
- PowerShell for Microsoft SharePoint 2010 : Arithmetic Operators
- Microsoft Systems Management Server 2003 : Updating Collections (part 3) - Collection Evaluator Update Process Flow, Status Messages
- Microsoft Systems Management Server 2003 : Updating Collections (part 2) - Deleting a Collection
- Microsoft Systems Management Server 2003 : Updating Collections (part 1) - Forcing an Update
- Implementing Exchange Server 2010 Security : Configuring Standard Permissions for Exchange Server (part 3) - Assigning Advanced Exchange Server Permissions
- Implementing Exchange Server 2010 Security : Configuring Standard Permissions for Exchange Server (part 2) - Assigning Standard Exchange Management Permissions
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us