# [SOLVED] shutdown -i gets error &quot;access is denied.(5)&quot;



## comonforall (Jan 28, 2011)

When I try the command shutdown -i to shut down network computers, it gets error "access is denied.(5)".

I also tried creating a same administrator account of the remote computer but still get the same error.

The computer from where I'm trying is windows 7 and other computers in LAN are xp.

Is there a way to fix it?

We are under Workgroup, not Domain


----------



## spunk.funk (May 13, 2010)

*Re: shutdown -i gets error "access is denied.(5)"*

Are you accessing the command prompt in Windows 7 in Elevated state? 
Go to Start/Search and type CMD right click the CMD icon and Run As Administrator. On the XP computers, log in as the Local Built in Administrator 
Shutdown Command Details and Examples


----------



## comonforall (Jan 28, 2011)

*Re: shutdown -i gets error "access is denied.(5)"*

Thanks.

Yes I'm using cmd in elevated state. 
Do you mean to make it work the remote computers must have been logged-in with in-built administrator account?


----------



## comonforall (Jan 28, 2011)

*Re: shutdown -i gets error "access is denied.(5)"*

@thanks spunk.funk.

I managed to shut down the remote computer as per your suggestion. I set password for in-built administrator of the remote computer 

Then I connected to the remote computer using the in-built administrator password instead of other admin account. Then shut it down and it worked. I'm excited. Again thanks.

However, i have few doubts on this.
(1) The syntax to log off (shutdown \\machine -l) is not working. I tried several syntax available online but nothing seemed to be working. But -r -s command working fine. Is my syntax wrong?

(2) I would like to know why connecting to other administrator account is not working. Is it mandatory to always use in-built administrator?


----------



## spunk.funk (May 13, 2010)

*Re: shutdown -i gets error "access is denied.(5)"*

If the computer is on a Domain, then it is necessary. 
Are you typing the command *shutdown \\[computername] /l* ?


> */l* = This option will immediately log off the current user on the current machine. You can not use the */l* option with the */m* option to log off a remote computer. The */d*, */t*, and */c* options are also not available with */l*.


----------



## comonforall (Jan 28, 2011)

*Re: shutdown -i gets error "access is denied.(5)"*

Yes I tried this command but it didn't work. It displays list of available commands for shut down.


----------

