This Video is about, detailed discussion on PowerShell Arrays
--------------------------------------------------------------------------------------------------------
In this complete Section of PowerShell Array , We will cover about many things with demo as mentioned below.
Items marked with hyphen (-- ) has have been covered in other parts of this PowerShell Array section
Items marked with asterisk (**** ) has have been covered in this part (PowerShell Arrays - Part - 02).
POWERSHELL ARRAYS DEEP DIVE - PART 1
• PowerShell Arrays Deep Dive #PowerShellArr...
-- What is PowerShell Array
-- How to declare or create an Array using PowerShell Array Operator
-- How to declare or create an Array using PowerShell Array Operator -- (DEMO)
-- How to create an Array without using PowerShell Array Operator
-- How to create an Array without using PowerShell Array Operator -- (DEMO)
-- Indexing & Accessing elements of an Array
-- Indexing & Accessing elements of an Array -- (DEMO)
-- How to Create Strongly Typed Arrays
-- How to Create Strongly Typed Arrays -- (DEMO)
POWERSHELL ARRAYS DEEP DIVE - PART 2
• PowerShell Arrays Deep Dive #PowerShellArr...
**** How PowerShell Operators Work with PowerShell Arrays 00:04
**** How PowerShell Operators Work with PowerShell Arrays (DEMO) 00:21
**** How to Use Properties of PowerShell Array 03:06
**** How to Use Properties of PowerShell Array (DEMO) 03:34
**** Method of PowerShell Array 04:26
**** Clear Method of PowerShell Array (DEMO) 05:04
**** Foreach Method of PowerShell Array 06:32
**** Foreach Method of PowerShell Array (DEMO) 06:58
**** Where Method of PowerShell Array 08:55
**** Where Method of PowerShell Array (DEMO) 10:29
POWERSHELL ARRAYS DEEP DIVE - PART 3
• PowerShell Arrays Deep Dive #PowerShellArr...
-- How to add or remove elements from an Array
-- How to add or remove elements from an Array (DEMO)
-- How to Iterate a script block against all element of an Array
-- How to Iterate a script block against all element of an Array (DEMO)
--------------------------------------------------------------------------------------------------------
Commands and Code, that has been Used in this Section is mentioned here, You can please use it to practice.
Creating Array using Array Operator
$fruits = @("Apple","Orange","Kiwi")
$fruits
$Numbers = @(1..12)
$Numbers
$Services = @(Get-Service)
$Services
Creating PowerShell Array by Simply assigning comma separated Value to a Variable
$Multi = "A","b","c"
$Multi
$Single = ,"White"
$Single
How Indexing works for an PowerShell Array
How to access elements of an PowerShell Array
$Numbers
$Numbers[0]
$Numbers[-1]
$Numbers[2..3]
$Numbers[1,3+5..7]
$Numbers[0..3+5..7]
Create Strongly Typed PowerShell Array
$Normal = 1,"b",222,"c"
$Normal
$Normal.GetType()
[int[]]$Strong = 1,"b",222,"c"
[int[]]$Strong = 1,222,2,4
$Strong.GetType()
Get-Process | Get-Member
[System.Diagnostics.Process[]]$Process = Get-Process
$Process.GetType()
PowerShell Operators working with PowerShell Arrays
Join Operator
$Numbers
$Numbers -join,"-"
-join $Numbers
Replace Operator
$fruits
$fruits -replace "orange","banana"
Contains Operator
$fruits -contains "kiwi"
In Operator
"Apple" -in $fruits
$fruits -eq "kiwi"
$fruits -ne "kiwi"
Properties and Methods of an PowerShell Array
$Numbers.Count
$Numbers.Length
$Numbers
$Numbers.Clear()
$Numbers | % {$_ -eq $null}
$Numbers = 1..12
$Numbers
$Numbers.ForEach({$_ * 2})
$fruits
$fruits.ForEach("ToUpper")
$Numbers.Where({$_ -lt 8})
('Yellow', '', 'Black').Where({$_.Length})
$Numbers.Where({$_ -lt 8},"first",0)
$Numbers.Where({$_ -lt 8},"last",2)
$Numbers.Where({$_ -gt 8},"SkipUntil")
$Numbers.Where({$_ -gt 8},"Until")
$running, $stopped = (Get-Service).Where({$_.Status -eq 'Running'}, 'Split')
Manipulate the PowerShell Array
$Numbers
$Numbers += 14
$Numbers
$Numbers[-1] = 16
$Numbers
$Numbers.SetValue(18,1)
$Numbers
$Numbers.RemoveAt(1)
$Numbers.IsFixedSize
[System.Collections.ArrayList]$NewNumbers = 1..5
$NewNumbers.IsFixedSize
$NewNumbers
$NewNumbers.remove(3)
$NewNumbers.removeat(0)
$NewNumbers.Add(100)
Iterating through elements of Array
$NewNumbers
foreach ($number in $NewNumbers)
{$Number * 4}
$NewNumbers
for($i = 0;$i -le $NewNumbers.Count;$i++)
{$NewNumbers[$i] * 5}
***************************************************************
***************************************************************
Join Me on --
Facebook Group
/ mylearningsonline
Facebook Page
/ mylearningsonline
YouTube Channel
/ mylearningsonline
**********************************************************************
#PowerShell #PowerShellScripting #PowerShellForBeginners #learnPowerShell #PowerShelltraining #PowerShellTutorial #MyLearningsOnline #WindowsPowerShell
PowerShell Scripting for Beginners
PowerShell Tutorial for Beginners
PowerShell Full Course
PowerShell Training for Beginners
PowerShell Array Tutorial
PowerShell Array foreach
Информация по комментариям в разработке