

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to convert the content of the file into uppercase or lowercase?
To convert the content of the file into the upper case, you need to use the method ToUpper() and to convert into lower case, you need to use ToLower() method.
Upper case example
(Get-Content D:\Temp\PowerShellaliases.txt).ToUpper()
Output
PS C:\WINDOWS\system32> (Get-Content D:\Temp\PowerShellaliases.txt).ToUpper() COMMANDTYPE NAME VERSION SOURCE ----------- ---- ------- ------ ALIAS % -> FOREACH-OBJECT ALIAS ? -> WHERE-OBJECT ALIAS AC -> ADD-CONTENT ALIAS ASNP -> ADD-PSSNAPIN ALIAS CAT -> GET-CONTENT ALIAS CD -> SET-LOCATION ALIAS CFS -> CONVERTFROM-STRING 3.1.0.0 MICROSOFT.POWERSHELL.UTILITY ALIAS CHDIR -> SET-LOCATION ALIAS CLC -> CLEAR-CONTENT ALIAS CLEAR -> CLEAR-HOST ALIAS CLHY -> CLEAR-HISTORY ALIAS CLI -> CLEAR-ITEM ALIAS CLP -> CLEAR-ITEMPROPERTY ALIAS CLS -> CLEAR-HOST
Lower case example
(Get-Content D:\Temp\PowerShellaliases.txt).ToLower()
Output
PS C:\WINDOWS\system32> (Get-Content D:\Temp\PowerShellaliases.txt).ToLower() commandtype name version ----------- ---- ------- alias % -> foreach-object alias ? -> where-object alias ac -> add-content alias asnp -> add-pssnapin alias cat -> get-content alias cd -> set-location alias cfs -> convertfrom-string 3.1.0.0 alias chdir -> set-location alias clc -> clear-content alias clear -> clear-host alias clhy -> clear-history alias cli -> clear-item alias clp -> clear-itemproperty alias cls -> clear-host alias clv -> clear-variable alias cnsn -> connect-pssession alias compare -> compare-object alias copy -> copy-item alias cp -> copy-item alias cpi -> copy-item alias cpp -> copy-itemproperty alias curl -> invoke-webrequest alias cvpa -> convert-path alias dbp -> disable-psbreakpoint alias del -> remove-item alias diff -> compare-object alias dir -> get-childitem
- Related Questions & Answers
- Convert string to lowercase or uppercase in Arduino
- How to convert all the records in a MySQL table from uppercase to lowercase?
- How to convert lowercase letters in string to uppercase in Python?
- Java program to convert a string to lowercase and uppercase.
- How to convert all uppercase letters in string to lowercase in Python?
- Conversion of whole String to uppercase or lowercase using STL in C++
- Golang Program to convert Uppercase to Lowercase characters, using binary operator.
- Making a Java String All Uppercase or All Lowercase.
- How to convert a string into uppercase in AngularJS?
- How to retrieve the content of the file in PowerShell?
- How to check whether a string is in lowercase or uppercase in R?
- How to read file content into istringstream in C++?
- Write a C program to convert uppercase to lowercase letters without using string convert function
- How to lowercase the entire string keeping the first letter in uppercase with MySQL?
- How to test if a letter in a string is uppercase or lowercase using javascript?
Advertisements