Solved

exit code of iCacls

Posted on 2014-02-26
1
791 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

19 Experts available now in Live!

Get 1:1 Help Now