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, ∼2711🔥, 0💬
Popular Posts:
Can I disable Windows service "COM+ Event System" to speedup my computer? Windows service "COM+ Even...
How to see all startup applications on your Window system? If you want see all startup applications ...
What is "Remote Access Auto Connection Manager" in my Windows XP service list? And how is "Remote Ac...
Can I remove startup application "msmsgs.exe - Microsoft Messenger" to speedup my computer and reduc...
What is "Software Protection" in my Windows 7 service list? And how is "Software Protection" service...