Help :-(

Hey Guys,

Having some troubles finishing off this. This is how it should go

Prompt to enter the folder name e.g. Enter username

Perform the Search in the share drive location

Copy username folder and content to users one drive

/pre

$DestBase = ‘\tpin01\it_data\Backups’
$Search = Read-Host -Prompt “Enter username:”

Get-ChildItem -Path \tpin01\IT_Data\Backups -Filter $Search -Directory -Recurse -ErrorAction SilentlyContinue -Force |
Copy-Item -Destination “$env:USERPROFILE\OneDrive” -Recurse -Force

/pre

Are you getting any errors?