PowerShell - Simply send objects to different variables
1 min read · Updated 29 April 2025
Did this guide help you? You can support me by subscribing to the channel, sharing it, disabling your ad blocker or making 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 $nullRelated links
- PowerShell
Windows 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 easily
2 min read
- PowerShell
Improving the usability of PowerShell on the command line with PSReadLine
The PSReadLine PowerShell module replaces the command line experience for PowerShell 3 and above
1 min read
- PowerShell
Viewing 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 Explorer
1 min read
- PowerShell
PowerShell - Testing network connectivity and port accessibility
Testing network connectivity and port accessibility with PowerShell
2 min read
- PowerShell
PowerShell - Display network connections (equivalent to netstat)
Display network connections (listening ports, active connections...)
2 min read
- PowerShell
PowerShell - Testing name resolution (equivalent to nslookup)
PowerShell commands to test name resolution (equivalent to nslookup)
2 min read