Solved

exit code of iCacls

Posted on 2014-02-26
1
830 Views
Last Modified: 2014-02-26
Hello,

I'm running this command in my script :

    icacls D:\Test /grant "$($userCN):(OI)(CI)M" | Out-Null

Open in new window


I'd like to get the exit status code to know if was OK or not

Any idea ?
0
Comment
Question by:Sybux
1 Comment
 

Accepted Solution

by:
Sybux earned 0 total points
ID: 39891113
Ok I answer myself and for futur research :

$LASTEXITCODE !!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now