__Description__
The file autospinstallerfunctionsmain.ps1 uses $env:TEMP to get the path to the current user's TEMP directory, but this does not work in some cases when the username has special characters (a dot in our case). This breaks the install since AutoSPInstaller writes and reads from files in the TEMP location.
__Example__
Username: DEV\sp.setup
$tempLocation = $env:TEMP
$tempLocation now contains C:\Users\SPF909~1.SET\AppData\Local\Temp\1. If you try to change to this directory it does not work in powershell, but it DOES work in cmd.exe.
__SOLUTION__
Use something like (Get-Item $env:TEMP).FullName instead of $env:TEMP. When using this syntax the $tempLocation variable above will contain "C:\Users\sp.setup\AppData\Local\Temp\1, i.e. a path that works with powershell.
Comments: Resolved with changeset 100209: Changes in this release:
AutoSPInstallerInput.xml: Incremented version number to 3.87; added UpdateAccount attribute to toggle updating the account that C2WTS runs as
AutoSPInstallerFunctions.ps1:
- Replaced all instances of $env:TEMP with (Get-Item $env:TEMP).FullName to support special characters in account names/paths (per issue 19520)
- Added call to ImportWebAdmininstration within ConfigureFarm function (needed for Win2008 R2)
- Improved CreateMetadataServiceApp function for better recovery when creation of service app doesn't finish properly (an as-yet unsolved issue); now at least we no longer need to delete the service app before re-running AutoSPInstaller
- CreateWebApp and CreateUserProfileServiceApplication functions now gracefully handle cases when the Default Web Site has been deleted in advance
- StartClaimsToWindowsTokenService now does *not* change the account that C2WTS runs under unless UpdateAccount has been set to true in AutoSPInstallerInput.xml
- ConfigureTracing function improved to avoid issues with ULS logging until SPTraceV4 is restarted
- Improved CreateEnterpriseSearchServiceApp function with regard to setting index location
- Broadened function Pause to support specific key presses to continue (in addition to 'any' key)
AutoSPInstallerMain.ps1: Updated to provide "Press 'y' to proceed with farm configuration message" prompt as I noticed it was way too easy to unintentionally initiate farm config with an accidental key press
AutoSPInstallerFolderStructure.txt: Updated PDF icon file name
The file autospinstallerfunctionsmain.ps1 uses $env:TEMP to get the path to the current user's TEMP directory, but this does not work in some cases when the username has special characters (a dot in our case). This breaks the install since AutoSPInstaller writes and reads from files in the TEMP location.
__Example__
Username: DEV\sp.setup
$tempLocation = $env:TEMP
$tempLocation now contains C:\Users\SPF909~1.SET\AppData\Local\Temp\1. If you try to change to this directory it does not work in powershell, but it DOES work in cmd.exe.
__SOLUTION__
Use something like (Get-Item $env:TEMP).FullName instead of $env:TEMP. When using this syntax the $tempLocation variable above will contain "C:\Users\sp.setup\AppData\Local\Temp\1, i.e. a path that works with powershell.
Comments: Resolved with changeset 100209: Changes in this release:
AutoSPInstallerInput.xml: Incremented version number to 3.87; added UpdateAccount attribute to toggle updating the account that C2WTS runs as
AutoSPInstallerFunctions.ps1:
- Replaced all instances of $env:TEMP with (Get-Item $env:TEMP).FullName to support special characters in account names/paths (per issue 19520)
- Added call to ImportWebAdmininstration within ConfigureFarm function (needed for Win2008 R2)
- Improved CreateMetadataServiceApp function for better recovery when creation of service app doesn't finish properly (an as-yet unsolved issue); now at least we no longer need to delete the service app before re-running AutoSPInstaller
- CreateWebApp and CreateUserProfileServiceApplication functions now gracefully handle cases when the Default Web Site has been deleted in advance
- StartClaimsToWindowsTokenService now does *not* change the account that C2WTS runs under unless UpdateAccount has been set to true in AutoSPInstallerInput.xml
- ConfigureTracing function improved to avoid issues with ULS logging until SPTraceV4 is restarted
- Improved CreateEnterpriseSearchServiceApp function with regard to setting index location
- Broadened function Pause to support specific key presses to continue (in addition to 'any' key)
AutoSPInstallerMain.ps1: Updated to provide "Press 'y' to proceed with farm configuration message" prompt as I noticed it was way too easy to unintentionally initiate farm config with an accidental key press
AutoSPInstallerFolderStructure.txt: Updated PDF icon file name