Skip to content

ShellGeek

  • Home
  • PowerShell
  • PowerShell Tips
  • About Us
  • Contact

How to Comment Out Code in PowerShell

by shelladmin

To comment out a single line of PowerShell script, use the # at the beginning of the line. Comment out code in PowerShell to create …

Read more

PowerShell String Remove Method

by shelladmin

PowerShell remove method deletes specified number of characters from the current string based on the beginning at a specified position and returns a new string. …

Read more

Replace String in Array using PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to replace the string in the array. e.g. $fileArr | ForEach-Object{$_.Replace(‘csv’,’xlsx’)} replace the string in the …

Read more

Replace Variable in File Using PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to replace the variable in a file.Use the Get-Content to read the content of the file …

Read more

Replace Space with Comma in String using PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to replace the space in a string with a comma. e.g. $str.replace(” “,”,”) replace the space …

Read more

Replace Case Insensitive in String using PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to do the case insensitive replacement in a string. e.g. $str -replace ‘hello’, ‘bye’ do case …

Read more

Replace Pipe Character in String using PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to replace the pipe in a string with an empty space. e.g. $str.replace(‘|’,”) replace the pipe …

Read more

Replace Parentheses in String using PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to replace the parentheses in a string with an empty space. e.g. $str.replace(‘(‘,”) replace the parentheses …

Read more

Replace Double Quotes in PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to replace the double quotes in PowerShell with empty spaces or single quotes. e.g. $str.replace(‘”‘,”‘”) replace …

Read more

Replace Space with Newline in PowerShell

by shelladmin

Use the PowerShell String replace() method or replace operator to replace the space in a string with a new line. e.g. $str.replace(” “,”`r`n”) replace the …

Read more

Older posts
Newer posts
← Previous Page1 … Page29 Page30 Page31 … Page46 Next →

Recent Posts

  • Outlook Logging – Enable Logging for Troubleshooting
  • PowerShell Stop-Process – How to Kill Process If Running
  • Get-AdUser – Find and Export Active Directory Users

Footer

  • Home
  • About Us
  • Dsquery
  • Outlook
  • Contact
  • Privacy Policy
  • Terms and Conditions
Copyright © 2023 ShellGeek All rights reserved