Hi!
I'm trying to backup the complete SP Farm using Powershell script. I've created a partision SP BACKUP (F:) for storing my backups. I made a ps1 file in C:\Admin where all my scrips are.
Backup script;
File name: BackupFarmFull.ps1
Add-PSSnapin "Microsoft.SharePoint.Powershell"
Set-ExecutionPolicy -ExecutionPolicy "Unrestricted" -Force
Backup-SPFarm - BackupMethod Full -Directory F:\FARM
Error shows
It updates my ExecutionPolicy but the settings are overridden by a policy in a more defined scope. It then remains in the current state of Bypass.
I then run Get-ExecutionPolicy -List and it shows undefined on; machine policy, user policy, process and current user. Local machine is set to Unrestricted.
Can anyone help me with this problem?
Erik