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, ∼3132🔥, 0💬
Popular Posts:
What is "IP Helper" in my Windows XP service list? And how is "IP Helper" service related to iphlpsv...
What is the HP computer registration process? If you bought a new HP computer and doing the initial ...
What is the "IP Helper (iphlpsvc)" system service on Windows Server 2012? Can I disable "IP Helper"?...
Can I remove startup application "SynTPEnh.exe - Synaptics TouchPad Enhancements" to speedup my comp...
Can I remove startup application "DSentry.exe - Dell DVDSentry" to speedup my computer and reduce se...