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: Compressing Files and Folders

# Set variables $compressTarget="C:\Temp\Win2016_Std_Template.ova" $parentFolder=split-path $compressTarget -Parent $grandParentFolder=split-path $parentFolder -Parent $compressedFile=$grandParentFolder+"\compressed.zip" # PowerShell version 5…

Hyper-V: Attach a New Virtual Disk

$vmName='TestVm' $storageLocation='\\FILESERVER06\SHAREXOXO' $newDiskSize='100GB' $dynamic=$true function createNewDisk{ param( $vmName, $storageLocation, $newDiskSize='100GB', $dynamic=$true ) $ErrorActionPreference='stop' try{ write-host…

PowerShell: Impersonation to Download Files Through Proxy

Initial Script to without impersonation # Change these values to reflect your desired downloads[string]$fileSource =…