Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Generate Object with Two Property Types

$
0
0

Summary: Use Windows PowerShell to generate an object with two property types.

Hey, Scripting Guy! Question How can I use Windows PowerShell to generate an object with two property types from simply splitting a string?

Hey, Scripting Guy! Answer Use the ConvertFrom-String cmdlet to pipe a string, and then specify the desired property types, for example:

PS C:\>“123 456” | ConvertFrom-String –PropertyType String,Int

 


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>