Recentemente mi è capitato di installare una Farm SharePoint 2016 composta da 2 frontend e 2 application server.
Come altre volte ho usato lo script AutoSPInstaller, opportunamente configurato, per automatizzare e velocizzare l'installazione.
Ma questa volta ho ottenuto un errore:
...
- Script halted!

Exception : System.Management.Automation.MethodInvocationException: Exception calling "ReadAllBytes" with
"1" argument(s): "Could not find file 'C:\ProgramData\Microsoft\Windows\Start
Menu\Programs\Microsoft SharePoint 2016 Products\SharePoint 2016 Management Shell.lnk'." --->
System.IO.FileNotFoundException: Could not find file 'C:\ProgramData\Microsoft\Windows\Start
Menu\Programs\Microsoft SharePoint 2016 Products\SharePoint 2016 Management Shell.lnk'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights,
Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES
secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare
share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean
useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at CallSite.Target(Closure , CallSite , Type , Object )

-
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
TargetObject :
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : FileNotFoundException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Set-ShortcutRunAsAdmin, C:\AutoSPInstaller\SP\Automation\AutoSPInstallerModule.psm1:
line 7782
at Start-Install, C:\AutoSPInstaller\SP\Automation\AutoSPInstallerMain.ps1: line 196
at <ScriptBlock>, C:\AutoSPInstaller\SP\Automation\AutoSPInstallerMain.ps1: line 400
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
L'errore era dovuto all'uso dell'installer di SharePoint 2016 in italiano.
Infatti guardando l'errore si nota che viene cercato un file SharePoint 2016 Management Shell.lnk nel percorso C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SharePoint 2016 Products\.
Andando a vedere in questa cartella si nota subito che esiste il file che lancia la PowerShell di SharePoint, solo che il nome è in italiano, ovvero Shell di gestione SharePoint 2016.

Per proseguire con la vesione italiana è sufficiente copiare il link esistente italiano, rinominarlo in inglese e rieseguire lo script AutoSPInstaller
Consiglio di utilizzare sempre l'installer di SharePoint in inglese, su una macchina con Windows Server in inglese, e poi applicare l'eventuale language pack di SharePoint in italiano
Tags:
Errori120 PowerShell199 SharePoint497 SharePoint 201667 Windows Server20
Potrebbe interessarti anche: