Nov 14 2022 08:35 AM
Hello Everyone,
I'm managing to create a script for a company I am working with, and unfortunately, I'm stuck.
The company wants some people to only access few directories using that path model:
C:\Users\Admin\Software\Clients\(Name of the clients)\DSS.
Each directory (Name of the clients) contains the same directories (DSS, OSS, Direct, Flux, Opex).
1 Group can only access DSS, Direct And Flux directories in read only mode, and can't access OSS and Opex directories.
I got stuck here because of the (Name of the clients) directories... I tried to put it like so:
C:\Users\Admin\Software\Clients\*\DSS
But it only reaches the first directory and don't applies on the other directories of Clients.
Can somebody please help me?
Nov 14 2022 01:34 PM
Nov 15 2022 12:39 AM
Nov 15 2022 01:31 AM
Nov 15 2022 01:41 AM - edited Nov 15 2022 01:51 AM
I tried without the "é" and it didn't work either (modified in the active directory), it could have been that but i think it can't reach each folders of the folder "Clients"
Nov 15 2022 04:45 AM
Nov 15 2022 05:08 AM
Nov 15 2022 05:13 AM - edited Nov 15 2022 05:37 AM
Solution$Data1=Get-ChildItem C:\Users\Administrateur\Software\Clients -Directory -Recurse | where-object Name -eq Direct
Does that work? I don't think the * works... Nope, it doesn't :)
Nov 16 2022 05:11 AM
I checked with that line:
Get-ChildItem C:\Users\Administrateur\Software\Clients\ -Recurse | Where-Object -Property Name -Contains 'Direct'
It looks like it works and showed me the Folder in the different "Clients" Folders. I need to manage it for the rest of the Script.
Thank you a lot for your good help!
Nov 16 2022 05:58 AM
Nov 17 2022 12:22 AM
Nov 17 2022 01:38 AM
Nov 17 2022 03:05 AM
Nov 15 2022 05:13 AM - edited Nov 15 2022 05:37 AM
Solution$Data1=Get-ChildItem C:\Users\Administrateur\Software\Clients -Directory -Recurse | where-object Name -eq Direct
Does that work? I don't think the * works... Nope, it doesn't :)