PowerShell Operators Deep Dive - Part 4 | EP 09 | PowerShell Zero to Hero in Month

Опубликовано: 01 Ноябрь 2024
на канале: Go Cloud Easily
1,191
26

This Video Tells about PowerShell Special Operators in detail.

In this Video, You will learn (Theory & Demo) about -
--- Special operators
-------------- Grouping Operator ()
-------------- Subexpression Operator
-------------- Call operator &
-------------- Array subexpression operator
-------------- Hash table literal syntax
-------------- Call operator
-------------- Cast operator
-------------- Comma operator
-------------- Index operator
-------------- Pipeline operator
-------------- Range operator
-------------- Member access operator


###################################################
Code & Commands, that has been used in this Video is mentioned Below, You can please Practice using this code.
###################################################
##### Special Operator - Grouping Operator
4+4/2

(4+4)/2

(Get-Service).DisplayName[2]
(Get-Service).count

#########################################################
##########################################################

Special Operator - Subexpression Operator $()

"My OS get updated using Service $((Get-Service |Where {$_.displayname -like "Win*date"}).Displayname)"

##############################################################
##############################################################

Special Operator - Call Operator

$command = Read-Host "Write Command That you want to run"
$command
& $command # Running Command Stored as String in a Variable

new-item d:\PsTraining\PracticeGround\Script1.ps1

Set-Content d:\PsTraining\PracticeGround\Script1.ps1 -Value "Get-Service"

"d:\PsTraining\PracticeGround\Script1.ps1"

& "d:\PsTraining\PracticeGround\Script1.ps1" # Running Script by getting Name of Script as String


#####################################################################
####################################################################

Special Operator - Cast Operator

$Variable = "Value"
$Variable
[int]$Variabale = "Value"
[int]$Variabale = 25
$Variabale

************************************************************************
************************************************************************
Join Me on --
Facebook Group
  / mylearningsonline  
Facebook Page
  / mylearningsonline  
YouTube Channel
   / mylearningsonline  

**************************************************************************
#PowerShell #PowerShellScripting #PowerShellForBeginners #learnPowerShell​ #PowerShelltraining​ #PowerShellTutorial #MyLearningsOnline

PowerShell Scripting for Beginners
PowerShell Tutorial for Beginners
PowerShell Full Course
PowerShell Training for Beginners