Posted On March 31, 2019

Restore User Script

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Restore User Script
echo off

SET RAR="C:\Program Files\WinRAR\RAR.EXE"

IF NOT EXIST P:\ (
NET USE P: \\WDFS1\BACKUP
)

cd %USERPROFILE%
%RAR% x -y p:\%username%\desktopstuff.rar
C:
cd %APPDATA%\MICROSOFT
MKDIR SIGNATURES
XCOPY P:\%USERNAME%\SIGNATURES SIGNATURES /E /H /Y
CD %APPDATA%\
MKDIR MOZILLA
MKDIR MOZILLA\FIREFOX
MKDIR MOZILLA\FIREFOX\PROFILES
XCOPY P:\%USERNAME%\FIREFOX MOZILLA\FIREFOX\PROFILES /E /H /Y

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Copying File Share Permissions from Source to Destination

# Copy-SMB-Share-Permissions.ps1 # Set some SMB Share variables $sourceSmbPath="\\FILESERVER002\Home" $destinationSmbPath="\\FILESERVER002-n\Home" $dateStamp = Get-Date -Format "yyyy-MM-dd-hhmmss"…

PowerShell: Get Spectre Meltdown Patching Versions of Hyper-V Hosts

function getHyperVHostsInForest{ function includeRSAT{ $ErrorActionPreference='stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #$rsatWindows7x32='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x86-RefreshPkg.msu' $rsatWindows7x64='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu' $rsatWindows81='https://download.microsoft.com/download/1/8/E/18EA4843-C596-4542-9236-DE46F780806E/Windows8.1-KB2693643-x64.msu' $rsat1709 = "https://download.microsoft.com/download/1/D/8/1D8B5022-5477-4B9A-8104-6A71FF9D98AB/WindowsTH-RSAT_WS_1709-x64.msu" $rsat1803…

PowerShell: Elevating Credential

$jumpbox="127.0.0.1" <# # Static Credentials (unsecured) $username = (Get-ADDomain).name+"\ADMINISTRATOR" $password = "PASSWORD" #> # Dynamic…