Getting an issue with SharePoint 2010 using changeset 99077:
* Running as Administrator
* UAC disabled
* Server 2008 R2
* Ran the same ASPI config with previous changeset (changed relevant parts) - no problems
* Manually adding the snap-in and running the cmdlet works
* Local machine (haven't gotten to remote part yet)
* Rebooted the server (to make sure IIS was properly installed - Central Admin comes up though)
> The term 'Get-Website' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I'm wondering if this change item is relevant:
```
# Thanks to Paul Stork per http://autospinstaller.codeplex.com/workitem/19318 for confirming the Stop-Website cmdlet
$defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"} # Try different ways of identifying the Default Web Site, in case it has a different name (e.g. localized installs)
```
Manually running "Get-Website" works -
```
- SharePoint 2010 binaries appear to be already installed - skipping installation.
--------------------------------------------------------------
--------------------------------------------------------------
- No language packs found in \\qa-spmultisrv1\C$\SharePoint\2010\LanguagePacks, skipping.
- Currently installed languages:
- English (United States)
--------------------------------------------------------------
- SharePoint 2010 binary file installation done!
Press any key to proceed with farm configuration...
--------------------------------------------------------------
- Loading SharePoint Powershell Snapin
--------------------------------------------------------------
--------------------------------------------------------------
- Checking farm membership for QA-SPMULTISRV1 in "QA-MultiSrv_Config"...
- QA-SPMULTISRV1 is already joined to farm on "QA-MultiSrv_Config".
--------------------------------------------------------------
--------------------------------------------------------------
- Configuring the SharePoint farm/server...
- Securing Resources...
- Installing Services...
--------------------------------------------------------------
- Script halted!
Exception : System.Management.Automation.CommandNotFoundException:
The term 'Get-Website' is not recognized as the name of
a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was includ
ed, verify that the path is correct and try again.
at
```
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
* Running as Administrator
* UAC disabled
* Server 2008 R2
* Ran the same ASPI config with previous changeset (changed relevant parts) - no problems
* Manually adding the snap-in and running the cmdlet works
* Local machine (haven't gotten to remote part yet)
* Rebooted the server (to make sure IIS was properly installed - Central Admin comes up though)
> The term 'Get-Website' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I'm wondering if this change item is relevant:
```
# Thanks to Paul Stork per http://autospinstaller.codeplex.com/workitem/19318 for confirming the Stop-Website cmdlet
$defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"} # Try different ways of identifying the Default Web Site, in case it has a different name (e.g. localized installs)
```
Manually running "Get-Website" works -
```
- SharePoint 2010 binaries appear to be already installed - skipping installation.
--------------------------------------------------------------
--------------------------------------------------------------
- No language packs found in \\qa-spmultisrv1\C$\SharePoint\2010\LanguagePacks, skipping.
- Currently installed languages:
- English (United States)
--------------------------------------------------------------
- SharePoint 2010 binary file installation done!
Press any key to proceed with farm configuration...
--------------------------------------------------------------
- Loading SharePoint Powershell Snapin
--------------------------------------------------------------
--------------------------------------------------------------
- Checking farm membership for QA-SPMULTISRV1 in "QA-MultiSrv_Config"...
- QA-SPMULTISRV1 is already joined to farm on "QA-MultiSrv_Config".
--------------------------------------------------------------
--------------------------------------------------------------
- Configuring the SharePoint farm/server...
- Securing Resources...
- Installing Services...
--------------------------------------------------------------
- Script halted!
Exception : System.Management.Automation.CommandNotFoundException:
The term 'Get-Website' is not recognized as the name of
a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was includ
ed, verify that the path is correct and try again.
at
```
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