This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Remove-EmptyFoldersLite.ps1 | |
#> | |
# $path = "." | |
$path = "C:\Temp" | |
$filename = "deleted_folders.txt" | |
$txt_file = "$env:temp\$filename" | |
$separator = "---------------------" | |
$empty_line = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Replace-String.ps1 | |
#> | |
# Description: A code snippet, which replaces every occurrence of a string in a file with PowerShell | |
# Credit: rominator007: "How can I replace every occurrence of a String in a file with PowerShell?" | |
# Source: https://stackoverflow.com/questions/17144355/how-can-i-replace-every-occurrence-of-a-string-in-a-file-with-powershell?rq=1 | |
$content = [System.IO.File]::ReadAllText("C:\Temp\example.txt").Replace("OldString","NewValue") | |
[System.IO.File]::WriteAllText("C:\Temp\example.txt", $content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Get-MapUsage.ps1 | |
#> | |
# Description: Tries to retrieve a "number of views" -number from a Google My Maps map and write it to a log file (map_log.csv at $env:temp). | |
# Example URL: https://www.google.com/maps/d/viewer?mid=QuiteAFewRandomLettersAndNumbers | |
# Note: Please replace the string below (between the single quotation marks) with a correct Google My Maps mid, which could be | |
# either (A) the string after = symbol in the original URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Get-TimeDifference.ps1 | |
Windows PowerShell: For a more comfortable reading experience, please type | |
help ./Get-TimeDifference -Full | |
#> | |
NewerOlder