Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

Converting VBScript's Dim Statement


Windows PowerShell


Definition: Declares variables and allocates storage space.

Dim

In VBScript the Dim statement is used to declare a variable, typically without assigning that variable a value of any kind. To declare a variable in Windows PowerShell, but without assigning a value to the variable, use a command similar to this:



$a = [string]

This command creates a new, empty string variable named $a. In order to declare a variable without assigning it a value you must specify a data type (although this data type can later be changed).


Return to the VBScript to Windows PowerShell home page

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.