I have created some domain users in ADUC and added them to the "Domain Admins" group. 

On a domain server when I try run a batch file that restart some services, with "net stop ", "net start " and "taskkill ", I get the following error message:

```
System error 5 has occured.
Access id denied.

```

And if I try to run the batch file with "Run as administrator" I get the following error message:
"This file does not have a program associated with it for performing this action..."

It only works if I open an new cmd as administrator and rund the batch script from there.

What rights do my domain admins account lack?
['https://superuser.com/questions/517315', 'https://superuser.com', 'https://superuser.com/users/179239/']
* insert a blank column in column C
* in `C1` put `=IF(A1="gmail.com","EN",B1)` and copy down
* copy and paste special value column C over the values in Column B
* delete the working column C

For a partial search try something like  

`=IF(ISERROR(SEARCH("gmail.com",A1)>0),B1,"EN")` in `C1`  

then copy down etc
Use an `IF` statement combined with a `RIGHT` function in column B. Place this formula in `B1`. 

```
=IF(RIGHT(A1,9)="gmail.com","EN", "HR")

```

This will look for the `gmail.com` and if it exists will populate the cell with `EN`, otherwise it will make it `HR`.

To copy it down all the rows in the column, double click on the bottom right corner of the cell where the drag cross is.