Forum Discussion
ABill1
Oct 26, 2023Iron Contributor
Is it possible to disable search location in file explorer voa intune
Hi all, Is it possible to disable the file search bar which allows users to search for locations ie Appdata via intune?
Nov 08, 2023
In one of your previous comments, you mentioned this:
# Define the folder path
$folderPath = "C:\Users\Username\appdata\Local\Microsoft\Edge\User Data\Default\Extensions\dlcaglefdlidioooijnigjhfcndlncfp"
# Define the account for which you want to deny permissions
$account = "AzureAD\Username"
# Get the current ACL
$acl = Get-Acl -Path $folderPath
# Create a rule to deny deletion and deletion of subfolders
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($account, "Delete, DeleteSubdirectoriesAndFiles", "Deny")
# Add the rule to the ACL
$acl.AddAccessRule($rule)
# Apply the modified ACL to the folder
Set-Acl -Path $folderPath -AclObject $acl
Change $account = "AzureAD\Username" to $account = "AzureAD\SID" where SID is the SID of the Liam C security group.
# Define the folder path
$folderPath = "C:\Users\Username\appdata\Local\Microsoft\Edge\User Data\Default\Extensions\dlcaglefdlidioooijnigjhfcndlncfp"
# Define the account for which you want to deny permissions
$account = "AzureAD\Username"
# Get the current ACL
$acl = Get-Acl -Path $folderPath
# Create a rule to deny deletion and deletion of subfolders
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($account, "Delete, DeleteSubdirectoriesAndFiles", "Deny")
# Add the rule to the ACL
$acl.AddAccessRule($rule)
# Apply the modified ACL to the folder
Set-Acl -Path $folderPath -AclObject $acl
Change $account = "AzureAD\Username" to $account = "AzureAD\SID" where SID is the SID of the Liam C security group.
ABill1
Nov 08, 2023Iron Contributor
Yes however the SID of that group needs to be on the device which isnt the case as this policy https://www.inthecloud247.com/add-an-azure-ad-group-to-the-local-administrators-group-with-microsoft-intune/ didnt work? Or will this work without doing this policy?