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, ∼2560🔥, 0💬
Popular Posts:
Can I remove startup application "ApacheMonitor.exe - Monitor Apache Servers" to speedup my computer...
How to start Apache server manually on Windows systems? If you followed our Apache server installati...
How set up "live tv" in Windows Media Center on Windows 7? If you have TV tuner installed on your co...
What is helpctr.exe - Microsoft Help and Support Center? helpctr.exe is the executable binary file o...
How to make text and icon size larger or smaller on my Windows 8 system? The text is too small and h...