another important question,
The parameter section: -executionpolicy Bypass, is that correct ?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi everyone,
I have a Powershell script runs as users login. I have tested , It runs if the user is domain admin, but does not run for domain users.
Set-ExecutionPolicy Bypass
$username=$env:username
$date=Get-Date -format M-d-yy-HHmm
$Source= "\FServer\Sharefolder\$username"
$Destination="\Fserver2\Sharefolder2\$username"
$Log="\Fileserver2\Sharefolder3\Temp\Log-$username-$date.txt"
If ($Source-and $Destination) {
ROBOCOPY $Source $Destination "/E" "/S" "/SEC" "/XD" "AppData" /LOG+:log
}
any help is appreciated.
another important question,
The parameter section: -executionpolicy Bypass, is that correct ?
How do you know that it's not running? Have the script create a transcript into a local temp folder and see if you are just getting some error.
Start-Transcript -path c:\Windows\temp\RemoveSig.log
... the script code goes here
Stop-Transcript
Hello @Akiyo Hiroshi ,
Thank you for your posting here.
If you logon one domain PC using one domain account, can you run the script successfully with this domain user?
Best Regards,
Daisy Zhou