nicolonsky / IntuneDriveMapping

Generate PowerShell scripts to map network drives on Intune managed Windows 10 devices
https://intunedrivemapping.azurewebsites.net/
MIT License
148 stars 17 forks source link

Mapping issues! #30

Closed SysadminRyan closed 3 years ago

SysadminRyan commented 3 years ago

Hiya, i have trawled through closed tickets but cant seem to find anything that points me in the right direction, i have updated $searchroot with my domain name, machine is connected through VPN and additional variables have been added as per below - $class = cimclass MSFT_TaskEventTrigger root/Microsoft/Windows/TaskScheduler $trigger2 = $class | New-CimInstance -ClientOnly $trigger2.Enabled = $True $trigger2.Subscription = ''

$trigger3 = $class | New-CimInstance -ClientOnly $trigger3.Enabled = $True $trigger3.Subscription = ''

Execute task in users context

$principal= New-ScheduledTaskPrincipal -GroupId "S-1-5-32-545" -Id "Author"

call the vbscript helper and pass the PosH script as argument

$action = New-ScheduledTaskAction -Execute $wscriptPath -Argument ""$dummyScriptPath" "$scriptPath""

$settings= New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries

$null=Register-ScheduledTask -TaskName $schtaskName -Trigger $trigger,$trigger2,$trigger3 -Action $action -Principal $principal -Settings $settings -Description $schtaskDescription -Force

Start-ScheduledTask -TaskName $schtaskName

upon reviewing the log file it states that 'The running command stopped because the preference variable "ErrorActionPreference" or comman parameter is set to stop: the system cannont contact a domain controller to service the authentication request. please try again later" i am able to ping the DC so have a route to it.

Any help appreciated, Ryan

SysadminRyan commented 3 years ago

I may have resolved this, when signing in with Windows hello for some reason it doesnt authenticate properly, however when manually entering the password it works and maps shared drives.

jonod8698 commented 3 years ago

You need to configure Hybrid Key Trust in order to access on-prem resources with Windows Hello

nicolonsky commented 3 years ago

Yes for WHFB a Key Trust (recommended) or certificate trust is required for on prem resource access as mentioned within the troubleshooting page