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, ∼2806🔥, 0💬
Popular Posts:
What is the scheduled task "\Microsoft\Windows\Sysm ain\WsSwapAssessmentTask "on my Windows 8 compute...
What is MUWebControl Class - Download Program Files (DPF)? MUWebControl Class is a Download Program ...
How do I move the licenses for the songs that I purchased from an online store to my new computer? T...
Can I disable Windows service "IMAPI CD-Burning COM Service" to speedup my computer? Windows service...
How do I move the licenses for the tracks that I ripped from CDs to my new computer? Typically, lice...