Powershell - Simply send objects to different variables
To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!
Hello,
An article to demonstrate how to simply send objects into different variables
# Define several variables, as many objects as variables$a, $b = 1, 2# $a will have a value of 1# $b will have a value of 2
# Another example$width, $height = '150*200'. Split('*')# $width will have a value of 150# $height will have a value of 200
# Define several variables, more objects than variables$a, $b = 1, 2, 3# $a will have a value of 1# $b will have a value of 2,3
# Define several variables, fewer objects than variables$a, $b, $c = 1, 2# $a will have a value of 1# $b will have a value of 2# $c will have a value of $null
Related links
Powershell - Simply send objects to different variables
Powershell - Tip - Simply send objects to different variablesWindows Admin Center - Installing extensions using Powershell
I find it quite time-consuming to have to install Windows Admin Center extensions from the interface and Powershell does it easilyImproving the usability of Powershell on the command line with PSReadLine
The PSReadLine PowerShell module replaces the command line experience for Powershell 3 and aboveViewing other types of file containing simple text in Windows
It is possible to view other types of file containing simple text, such as .ps1, .psm1, .psd1, .twig, .gcode... in Windows File ExplorerPowershell - Testing network connectivity and port accessibility
Testing network connectivity and port accessibility with PowershellPowershell - Display network connections (equivalent to netstat)
Display network connections (listening ports, active connections...)