This file contains hidden or 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
# ============================================================================= | |
# | |
# Script Name: Organise-Photos | |
# | |
# Author: Andy Parkhill | |
# | |
# Date Created: 09/07/2021 | |
# | |
# Description: A script to organize my photos (and backups) into a coherent | |
# file structure, and remove duplicates, etc. |
This file contains hidden or 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
# ========================================================================== | |
# | |
# Script Name: Install-ProgramsTemplate.ps1 | |
# | |
# Author: Andy Parkhill | |
# | |
# Date Created: 07/10/2019 | |
# | |
# Description: A template setup script for Windows 10 PCs. Take the template | |
# and create a specific setup script for each new PC. |
This file contains hidden or 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
function Start-SleepTimer | |
{ | |
param | |
( | |
[Alias('s')] | |
[int] $seconds | |
) | |
for($index = $seconds; $index -gt 0; $index--) |
This file contains hidden or 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-SPSite -limit all -WebApplication <Web Application URL> | Select Url, ContentDatabase |
This file contains hidden or 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
# ========================================================================== | |
# | |
# Script Name: Install-ProgramsForWindows10.ps1 | |
# | |
# Author: Andy Parkhill | |
# | |
# Date Created: 22/09/2016 | |
# | |
# Description: A simple environment setup script for Windows 10 PCs. | |
# |
This file contains hidden or 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-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Sort-Object DisplayName | Export-CSV -Path C:\Temp\InstalledPrograms.csv -NoTypeInformation -Delimiter "|" | foreach { $_ -replace '^"','' -replace "`"|`"", "|" -replace '"$','' } |
This file contains hidden or 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
netdom.exe resetpwd /s:<server> /ud:<user> /pd:<password> |
This file contains hidden or 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
tree -d -L 3 -N > /mnt/c/Temp/FolderListing.txt |
This file contains hidden or 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-ChildItem -Recurse -Directory -Depth 2 | Out-File C:\Temp\FolderListing.txt |
This file contains hidden or 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
SELECT execquery.last_execution_time AS [Date Time] | |
,execsql.text AS [Script] | |
FROM sys.dm_exec_query_stats AS execquery | |
CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql | |
WHERE execsql.text LIKE '%<text to search for>%' | |
ORDER BY execquery.last_execution_time DESC |
NewerOlder