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, ∼2419🔥, 0💬
Popular Posts:
What is the startup program "QuickSet MFC Application - quickset.exe" on my Windows 8 computer? Can ...
How do I copy customized media information for my files to my new computer? When you add or edit med...
What is yt.dll - DLL File - Yahoo Toolbar for IE Browser? yt.dll is installed as part of the Yahoo! ...
A collection of 39 tutorials on understanding and managing Windows startup programs: What is a start...
What is "Lenovo Hotkey Client Loader" in my Windows 7 service list? And how is "Lenovo Hotkey Client...