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, 1672🔥, 0💬
Popular Posts:
How to dump the list of all processes that are running on my Windows 7 system? I want save names of ...
How to publish HTML documents to your local Apache server? If you followed our Apache server install...
Can I disable Windows service "PCAngel.exe - PC Angel" to speedup my computer? Windows service "PCAn...
How to remove YahooMessenger.exe from the startup application list to gain performance and reduce se...
What is yt.dll - DLL File - Yahoo Toolbar for IE Browser? yt.dll is installed as part of the Yahoo! ...