How can i catch exeption of command powershell dsacls


hi everyone,

i deverloping ps1 setting permission public or non-pucblic user on adlds

i using command dsacls follow guide

https://technet.microsoft.com/en-us/library/cc771151(v=ws.10).aspx

anybody know how catch exeption of command?


qp

hi quyen,

sure thing:

you can storing output-string in variable , parsing it. might possible check exitcode errors. since dsacls not powershell function, cmdlet or .net component, cannot use try/catch on it, these options while using dsacls.

cheers,
fred


there's no place 127.0.0.1




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...