Managed accounts - directory name is invalid

Aug 11, 2011 at 3:05 PM

Dear all,

in the step of adding the managed acocunts the first is created. Then it throws the following error.

Creating local profile for SNVWORLD\spservices_test...Start-Process : This command cannot be executed due to the error: The directory name is invalid.

This happens on : Start-Process -FilePath "$env:SYSTEMROOT\System32\cmd.exe" -ArgumentList "/C" -LoadUserProfile -NoNewWindow -Credential $credAccount

I run the script from a network location from a mapped drive. When I check the users directory I see a folder for spservices_test and the account spservices_test is in the Local Admin group.

WARNING:  - Could not create local user profile for domain\spservices_test

I did not change the commonnames : spservice / portalapppool / mysiteapppool or searchservice name.

I found some references here : http://sharepointresource.com/2011/04/08/start-process-this-command-cannot-be-executed-due-to-the-error-the-directory/#more-86 but does not help me to understand why the profile can not be created.

Thanks for any assitance or pointers on this.

Rgds,

Nico

Aug 11, 2011 at 3:27 PM

update :  I delected the user folder for spservices_test and removed the account from the local admin group.

Ran the script again now the outcome is that spservices_test is in the admin group again, but there is not user profile directory under C:\users\

Must have been some other reason that the latter directory was there when this is issue popped up.

Aug 12, 2011 at 8:22 AM

update2 : I logged on (RDP) with the spservices_test account to see if that would work. Appearantly deleting the C:\users\spservices_test directory was not a good idea.

I now got the message that I was logged on with a temporary profile - solution to this is editing the registry as it still hold information pointing to the deleted profile directory.

Aug 12, 2011 at 9:27 AM

update3 : I see there was a discussion allready. I added the spfarm_test account to the network drive with full control. No luck though.

I guess I will move the script to the machine where I'm doing the install to continue it - That would lead me to conclude that it is not possible to run AutoSPInstaller form a network drive?!?

http://autospinstaller.codeplex.com/discussions/267923

http://sharepointresource.com/2011/04/08/start-process-this-command-cannot-be-executed-due-to-the-error-the-directory/

Aug 12, 2011 at 9:46 AM

update4 Solved - You have to like these discussion that you have with yourself ;-)

The problem was caused by running the script from a mapped drive. Found the hint for this here : http://www.spjeff.com/?p=490

Coordinator
Aug 15, 2011 at 11:21 PM

Nigel Price just posted a patch for this (http://autospinstaller.codeplex.com/SourceControl/list/patches)- will be included in the next release...

Brian