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
# Define the path where you want to save the CSV file | |
$exportPath = "C:\temp\ExportLogs.csv" | |
# Get the current date and subtract 3 days | |
$startDate = (Get-Date).AddDays(-3) | |
# Define the log names | |
$applicationLog = "Application" | |
$systemLog = "System" |
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
# Make sure the execution policy is set to All Signed | |
Set-ExecutionPolicy -ExecutionPolicy AllSigned | |
Write-Output "Checking to see if the Windows Update cmdlets are installed" | |
Install-Module PSWindowsUpdate -Confirm | |
Write-Output "Installing Windows Updates" | |
Get-WindowsUpdate -AcceptAll -Install -AutoReboot |
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
192.168.1.254 | |
192.168.1.253 |
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
:: Don't echo all the text to the command window | |
@echo off | |
:: Create a copy from D:\ImportantStuff\Pictures directory to the local directory HomeBackups\Pictures | |
:: Robocopy's /mir switch will only copy files if they change or don't exists in the destination directory | |
robocopy D:\ImportantStuff\Pictures HomeBackups\Pictures /mir | |
:: Copy D:\Music to HomeBackups\Music | |
robocopy D:\Music HomeBackups\Music /mir |