Jump to content

Recommended Posts

Posted

i'm try to copying a wallpaper file and desktop shortcuts, i've done this at a job before before my current one and it worked, now gone to implement it, currently using windows 11 24H2 which i'm starting to think is the issue.

The PowerShell script is 

 

copy-item -path "$PSScriptRoot\Shortcuts\*" -destination "C:\Users\Public\Desktop" -Recurse

also tried 

 

$ScriptPath = Split-Path $MyInvocation.MyCommand.Path

and 

".\Shortcuts\"

 

I package them up as win32 app, then used these commands in Intune and check it is set to system.

 

powershell.exe -File .\OfficeShortcuts.ps1

and 

powershell.exe -ExecutionPolicy Bypass -File .\OfficeShortcuts.ps1

and 

C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe  -command .\OfficeShortcuts.ps1


 

but always fails?

 

Andrew

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...