Comments (3)
from intunedrivemapping.
I had added a small section to my drivemapping script to removal of the old scheduled tasks when I had updated this prior to the old generated script being updated.
`$taskname = "IntuneDriveMapping","InTuneDriveMapping"
foreach ($task in $taskname)
{
$taskExists = Get-ScheduledTask | Where-Object {$_.TaskName -like $task }
If ($taskExists)
{ #Removes the Scheduled Task in queue
Unregister-ScheduledTask -TaskName $task -Confirm:$false
Write-Host "The Scheduled Task $task has been removed."
} else
{
Write-Host "The Scheduled Task $task did not exist."
}`
I wasn't concerned about the initial script since it wasn't being called by a scheduledtask any longer, but you could certainly have it built into your version of the script to search and remove the old DriveMappping.ps1 file if it exists on your user's PC.
from intunedrivemapping.
Ah I see - this makes sense, thank you!
from intunedrivemapping.
Related Issues (20)
- Allow updating script in editor HOT 2
- MapNetworkDrive connect using different credentials HOT 2
- The (member:1.2.840.113556.1.4.1941:=) search filter is invalid. HOT 3
- Script not detecting that it is running as system HOT 3
- Multiple Security Group HOT 4
- Hidden Drive Support
- Drive Label not Expand correctly
- Drives will be unmapped if Membership could not retrieved
- Support for Azure storage accounts?
- Username/Password
- Performance issues with DriveMapping Script
- Remove script from task scheduler HOT 1
- Script does not have logic to re-map a network drive when a UNC path is changed HOT 4
- Drives map when task run manually but not when triggered
- How to add to the script removing all mapped drives before mapping them HOT 1
- Getting below error while running the script HOT 1
- NOT option for groups?
- Addressing %USERNAME%, and various file servers on the script?
- execution restriction preventing drive maps of being added HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intunedrivemapping.