Comments (8)
I'm in a similar boat Anaylor. Couldn't get it to do anything, despite it showing as successful in Intune. I finally toggled it over to run as SYSTEM instead of the Logged in USER. This created the Schedule task, but I can't get that to run. It looks like it's calling a VBS file. When I tried to run the VBS File manually, It comes back with error at line 7 character 2. I don't know what I'm doing wrong, but here the VB code.
Dim shell,fso,file
Set shell=CreateObject("WScript.Shell")
Set fso=CreateObject("Scripting.FileSystemObject")
strPath=WScript.Arguments.Item(0)
If fso.FileExists(strPath) Then
set file=fso.GetFile(strPath)
strCMD="powershell -nologo -executionpolicy ByPass -command " & Chr(34) & "&{" &_
file.ShortPath & "}" & Chr(34)
shell.Run strCMD,0
End If
from intunedrivemapping.
Hi guys @anaylor130683 @etreater "Script not working" is not a really helpful description for an issue.
-
Can you verify connectivity to the network share by manually accessing the share from a test machine?
- Keep an eye on password / Windows Hello for Business prompts - if you receive them you need to investigate this first
-
If you have configured security group filtering verify the output of the following PowerShell function: https://github.com/nicolonsky/IntuneDriveMapping/blob/master/IntuneDriveMapping/wwwroot/bin/IntuneDriveMappingTemplate.ps1#L32 and check if you have line of sight to an Active Directory Domain Controller
@anaylor130683 PowerShell execution policy does not interferer when the script is executed via Intune or scheduled task as both mechanism bypass the execution policy
@etreater the vbscript is only a wrapper to suppress the PowerShell window from appearing. It takes the path of the PowerShell script as command line argument
from intunedrivemapping.
from intunedrivemapping.
@etreater I published a new version of the script and populated the project wiki with some troubleshooting info and details.
Your problem is probably related to the issue that your machines don't have the $env:USERDNSDOMAIN
environment variable - you find the required adjustments in the wiki. Just update the $searchRoot
variable with your active directory domain name e.g. "intra.contoso.com".
from intunedrivemapping.
from intunedrivemapping.
Then you need to investigate the ‘Get-ADGroupMembership’ function in the script - what does it return in your case? It usually returns all groups (sam account name format) the user is a member of. You also need to specify your group filters with sam account format without any domain prefix. @etreater
from intunedrivemapping.
from intunedrivemapping.
@etreater glad that it resolved your issue. I‘ve also added the sAMAccountName stuff without the domain prefix to the wiki.
Cheers, nicola
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
- Question: Old script renamed to DriveMappping.ps1 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 5
- 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.