Open IntuneEnterPriseAdmin opened 1 year ago
Hello,
if the Script runs (offline, or with no active VPN connection) the Script does not retrieve the GroupMemberships and unmapp all drives with active GroupFilter.
$groupMemberships = Get-ADGroupMembership -UserPrincipalName $(whoami -upn)
this will return nothing
for me i changed it to
if(!$groupMemberships) { Write-Output "No GroupMemberships, exit Script" exit }
so if no GroupMemberships can be retrieved it stops the processing and does not unmapp my Drives.
ps. failure handling in this part is also important
catch {
exit
}
Thank you
Hello,
if the Script runs (offline, or with no active VPN connection) the Script does not retrieve the GroupMemberships and unmapp all drives with active GroupFilter.
$groupMemberships = Get-ADGroupMembership -UserPrincipalName $(whoami -upn)
this will return nothing
for me i changed it to
if(!$groupMemberships) { Write-Output "No GroupMemberships, exit Script" exit }
so if no GroupMemberships can be retrieved it stops the processing and does not unmapp my Drives.
ps. failure handling in this part is also important
catch {
nothing we can do
}
Thank you