stereoakp.blogg.se

How to use fastcopy
How to use fastcopy






how to use fastcopy

Public const UInt32 STANDARD_RIGHTS_READ = 0x00020000u Public const UInt32 STANDARD_RIGHTS_REQUIRED = 0x000F0000u Public const UInt32 STANDARD_RIGHTS_ALL = ( Public const UInt32 SYNCHRONIZE = 0x00100000 Public const UInt32 WRITE_OWNER = 0x00080000 Public const UInt32 WRITE_DAC = 0x00040000 Public const UInt32 READ_CONTROL = 0x00020000 New-Item -ItemType Directory -Force -Path $logpath $pathErrorsLog="$logPath`\$hostname-path-errors-log-$dateStamp.txt" $lockedFilesReport="$logPath`\$hostname-locked-files-log-$dateStamp.txt" $errorsLogFile="$logPath`\$hostname-filecopy-errors-$dateStamp.txt" Write-Host -NoNewLine "Running as Administrator." # Exit from the current, unelevated, process # Indicate that the process should be elevated $newProcess.Arguments = $myInvocation.M圜ommand.Definition # Specify the current script path and name as a parameter # Create a new process object that starts PowerShell # We are not running "as Administrator" - so relaunch as administrator #$Host.UI.RawUI.BackgroundColor = "Black" $Host.UI.RawUI.WindowTitle = $myInvocation.M圜ommand.Definition + "(Elevated)" # We are running "as Administrator" - so change the title and background color to indicate this If ($myWindowsPrincipal.IsInRole($adminRole)) # Check to see if we are currently running "as Administrator" # Get the security principal for the Administrator role $myWindowsPrincipal=new-object ($myWindowsID) # Get the ID and security principal of the current user account

how to use fastcopy

$logPath="$scriptPath`\fileSyncLogs\$hostname" $dateStamp = Get-Date -Format "yyyy-MM-dd-hhmmss" # Using System.Array Object constructor to create a two dimensional SendMail Variables # Specify Sources (LFS) and Destinations (UNC) $bypassFileCompare=$True # Set this to true for large directories so that the program knows to skip fileCompare $fastSync=$true # If both values above are false, then sync-type will be 'fastSync' $finalSync=$false # This value overrides the one below # Set the behavior of script in this section








How to use fastcopy