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, ∼2429🔥, 0💬
Popular Posts:
What is the scheduled task "\Microsoft\Windows\Wini net\CacheTask"on my Windows 7 computer? "\Micros...
How to setup a HP laptop computer? I want to buy the new HP laptop computer on sale at Best Buy for ...
What is the "McClientAnalytics.exe" process on windows 7? Is the "McClientAnalytics.exe" process a v...
What is the installed program "Windows SDK Signing Tools" on my Windows 7 computer? Why it is not vi...
Can I remove startup application "Directcd.exe - Roxio DirectCD Application" to speedup my computer ...