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, ∼2420🔥, 0💬
Popular Posts:
A collection of 24 tutorials on removing Windows startup programs to gain performance and reduce sec...
What is "Lenovo Keyboard Noise Reduction" in my Windows 7 service list? And how is "Lenovo Keyboard ...
What files are stored in the "C:\Users\<userid >\AppData\Local\M icrosoft\Windows\Tempor. ..
How to configure Apache server to run PHP engine as a loaded module on Windows systems? If you have ...
Why am I getting this authentication failed message when adding my cell phone as a bluetooth device ...