Collections:
Other Resources:
Assign Object to Variable in Windows PowerShell Scripts
How to assign an object to a variable in Windows PowerShell scripts?
✍: FYIcenter.com
The output object of a cmdlet can be assigned to a variable using the
assignment operator "=".
Remember, variable names must start with the "$" sign. So here is an example of assign a DateTime object to a variable:
$now = Get-Date $now | format-list -Property TimeOfDay
Running the above script will return something like:
TimeOfDay : 22:06:45.1984174
⇒ Access Object Properties in Windows PowerShell Scripts
⇐ Add Comments in Windows PowerShell Scripts
2016-11-02, ∼2894🔥, 0💬
Popular Posts:
What is ZCfgSvc.exe process - Intel Wireless ZeroCfgSvc MFC Application? Process ZCfgSvc.exe is the ...
Using Columnar as the layout for a form as shown in the previous tutorial is good to enter new recor...
Where to get help on analyzing HijackThis log files? Analyzing HijackThis log files are not easy to ...
Every time I open Internet Explorer a bar pops up saying that it is runner with out add ons. I check...
Why don't my playlists work on my new computer? An entry in a playlist uses a "relative path" to ide...