Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting the Windows Script Host GetResource Method

Windows PowerShell

Definition: Returns the value of a resource defined with the <resource> element.


The GetResource method is reserved for use with Windows Script Files (.WSF files), and is primarily used as a way to localize a script: it enables you to define a set of strings (for example, an error message localized into several different languages) and then retrieve a specific value using an assigned – and unique – resource ID. The initial release of Windows PowerShell does not include anything similar to GetResource. However, the Community Technology Preview (CTP) release of Windows PowerShell 2.0 features a data section that does something similar: it enables you to separate your actual scripting code from resource information such as error messages. For more information about the data section, see the Windows PowerShell online help.

See conversions of other Windows Script Host methods and properties.
Return to the VBScript to Windows PowerShell home page

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft