PowerShell Script Programming Question Given the following t

PowerShell Script Programming Question Given the following two PowerShell strings...... [string] $animal1 = \"Elephant\" [string] $animal2 = \"elephant\" Using the above two strings, write powershell statements in the given box below, in the SAME ORDER AS QUESTIONS. Check for equality of the two strings regardless of the case. Check for equality of the two strings; case important Write a Single PowerShell line to make the word LENT (note all uppercase) using either $animal1 or $animal2 (Your answer must be in one line for full credit)

Solution

Checking String equality regardless of the case:

>$animal1.ToLower() -eq $animal2.ToLower()

Checking string equality when case is important:

>$animal1 -eq $animal2

Make the word LENT from $animal1

>$animal1.ToUpper().Substring(1:3)+$animal1.ToUpper().Substring(6:8)

PowerShell Script Programming Question Given the following two PowerShell strings...... [string] $animal1 = \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site