How to change System Language with Powershell - powershell

I have a PowerShell script that intends to change the System Locale on a Windows 10 Machine, but it doesn't really change that much, it just "downloads" the language but doesn't set it to the language, so I have to do it manually.
Set-Culture de-DE
Set-WinSystemLocale -SystemLocale de-DE
Set-WinUILanguageOverride -Language de-DE
Set-WinHomeLocation -GeoId 94
New-WinUserLanguageList -Language de-DE
Set-WinUserLanguageList de-DE -Force
shutdown -r;exit
It outputs this
LanguageTag : de-DE
Autonym : Deutsch (Deutschland)
EnglishName : German
LocalizedName : Deutsch (Deutschland)
ScriptName : Lateinisch
InputMethodTips : {0407:00000407}
Spellchecking : True
Handwriting : False
UPDATE: Ok seems like it works now (not that I changed anything?) - It changed everything for the local User profile, the thing i want is that it applied to the Welcome Screen and possible New User Profiles also is it possible to change the language for non unicode programs.
UPDATE 2: Okay after some testing It just downloads the new Pack but doesn't actually apply it - when the pack had already been downloaded it applies it - my question is - How do I apply the language pack without installing it manually?
Here you can see the Spanish language pack it says that it is available but my system language is still the same
Any idea how I can automate this process?
Thanks a lot!.

Related

Multidomain multilanguage sites on single typo3 v10 installation

I have read all documentation and something that seems obvious is not happening in my installation. I have several domains:
domain.net
domain.fr
domain.it
all of them are pointing the typo3 folder in server. After adding all these domains and corresponding languages in site management > sites
I still only get original frontend in .net domain rest wont show anything (blank).
Note: most information online is older versions and it seems that this point has been simplified in this version, so there is no need to include any code in .htaccess or other files. Also followed this
Looking into my folder tree I can see these folders (for each site) in mainfolder/typo3conf/sites and every of them has its config.yaml file.
Substituted real name for "domain"
this is what .net looks like (english version)
base: 'https://example.net/'
baseVariants: { }
errorHandling: { }
languages:
-
title: English
enabled: true
base: 'https://example.net/'
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
websiteTitle: ''
navigationTitle: English
hreflang: en-US
direction: ltr
flag: en-us-gb
languageId: '0'
rootPageId: 1
routes: { }
websiteTitle: ''
This is .fr (french version)
base: 'http://example.fr/'
baseVariants: { }
errorHandling: { }
languages:
-
title: French
enabled: true
languageId: '0'
base: 'http://example.fr/'
typo3Language: fr
locale: fr_FR.UTF-8
iso-639-1: fr
navigationTitle: Français
hreflang: fr-fr
direction: ltr
flag: fr
websiteTitle: ''
rootPageId: 2
routes: { }
websiteTitle: ''
Tree inside is just this
Pages have dummy content we arent developing anymore until this problem is solved.
Any idea?
Server setup should be ok as before typo3 i was able to have a wordpress multisite and it did show content. As WP isnt native multilanguage and it works with all kind of plugins that just break everything when you update. This is why we are changing to typo3. But that is another story.
Usually when everything seems fine but it doesnt work, its something silly.
.fr domains and others were handling a lower version of php so it wouldnt run typo3
So if something like this happens to you check php version on every domain!!!

Checksum = "SHA-256" not working

I am trying to deploy an application using Powershell DSC; it mostly works, except that I also want the executables to be checked everytime, using a checksum :
Checksum = "SHA-256"
It simply does not work, DSC doesn't see that the executable must be replace by a newer version; same thing with SHA-1. However, this works :
Checksum = "modifiedDate"
But I don't want to rely on a date, I really want the contents of the executable to be 100% correct.
Any idea why it doesn't work ?
Thanks to briantist for pointing to what was missing :
MatchSource = $true
It is very surprising to me that the default of "MatchSource" is $false...

How to get Resharpers InspectCode to recognize Plugins?

I am trying to run ReSharpers command line tool InspectCode.exe. It's running fine doing it's job with the expected output.
However after my earlier attempt to get plugins to work, this time with the new version it is supposed to be supported. There is a switch in the command line interface that allows to specify the extension you want to use.
/extensions (/x) – allows using ReSharper extensions that affect code analysis. To use an extension, specify its ID, which you can find by opening the extension package page in the ReSharper Gallery, and then the Package Statistics page. Multiple values are separated with the semicolon.
But I cannot get it to work properly. I cannot even provoke any reaction to the /x switch at all. No matter how or what I pass, I get no feedback from the executable and the output is identical. I don't even get an error message when passing obvious garbage.
I tried the following commandlines for the exact same result:
inspectcode.exe /o="rcli.xml" /swea /x="ReSharper.StyleCop" "my.sln"
inspectcode.exe /o="rcli.xml" /swea /x=ReSharper.StyleCop "my.sln"
inspectcode.exe /o="rcli.xml" /swea "my.sln"
inspectcode.exe /o="rcli.xml" /swea /x=ABCDEFG "my.sln"
Result
JetBrains Inspect Code 9.1.1
Running in 64-bit mode, .NET runtime 4.0.30319.18444 under Microsoft Windows NT
6.1.7601 Service Pack 1
Enabled solution-wide analysis according to Inspect Code command line Setting.
Analyzing files
[files]
Inspection report was written to rcli.xml
What am I doing wrong? How to get extensions to work?
I already tried the R# forums, but it took them more then 24h to approve my post and so far I'm not sure someone else even read it.
Unfortunately, the support for extensions was dropped in 9.0 due to the refactorings in the "ReSharper platform". I hope that JetBrains will bring it back soon.
See RSRP-436208.
This is a late answer that might help future readers (like myself). Currently inspectcode.exe will automatically look for and use any NuGet packages that are in the same folder as the executable (source).
Example for CleanCode extension:
if you have a R# instance on some machine and install the extension, it will be placed in C:\Users\{user}\AppData\Local\JetBrains\plugins\MO.CleanCode.5.6.15
copy MO.CleanCode.5.6.15.nupkg and paste it next to inspectcode.exe
when running inspectcode with verbosity = VERBOSE, the extension should appear in the Zones list:
$cmd = "..\JetBrains.ReSharper.CommandLineTools.2019.3.4\inspectcode.exe"
$outputFile = "..\Output\$($outputName).xml"
& $cmd -o="$outputFile" $sln --verbosity=VERBOSE
Zones: (52pcs)[CodeInspectionPageImplZone, DaemonEngineZone,
DaemonZone, IAmd64CpuArchitectureHostZone, IAspMvcZone,
IBatchToolEnvironmentZone, IClrImplementationHost Zone,
IClrPsiLanguageZone, ICodeEditingOptionsPageImplZone,
IConsoleEnvironmentZone, ICppProductZone, ICpuArchitectureHostZone,
IDocumentModelZone, IEnvironmentZone, IHostSolutionZone,
IInspectCodeConsoleEnvironmentZone, IInspectCodeEnvironmentZone,
IInspectCodeZone, ILanguageAspZone, ILanguageBuildScriptsZone,
ILanguageCppZone, I LanguageCSharpZone, ILanguageCssZone,
ILanguageHtmlZone, ILanguageIlZone, ILanguageJavaScriptZone,
ILanguageMsBuildZone, ILanguageNAntZone, ILanguageProtobufZone, ILa
nguageRazorZone, ILanguageRegExpZone, ILanguageResxZone,
ILanguageVBZone, ILanguageXamlZone, INetFrameworkHostZone, INuGetZone,
IOperatingSystemHostZone, IProjectMode lZone,
IPsiAssemblyFileLoaderImplZone, IPsiLanguageZone,
IPublicVisibilityZone, IRdFrameworkZone, IRiderModelZone,
ISinceClr2HostZone, ISinceClr4HostZone, ITextContro lsZone,
IToolsOptionsPageImplZone, IWebPsiLanguageZone, IWindowsNtHostZone,
PsiFeaturesImplZone, ReplaceableByIntelliJPlatformZone, SweaZone]
Packages: (23pcs)[JetBrains.ExternalAnnotations,
JetBrains.Platform.Core.Ide, JetBrains.Platform.Core.IisExpress,
JetBrains.Platform.Core.MsBuild, JetBrains.Platform. Core.Shell,
JetBrains.Platform.Core.Text, JetBrains.Platform.Interop.CommandLine,
JetBrains.Platform.Interop.dotMemoryUnit.Framework,
JetBrains.Platform.Interop.dotMe moryUnit.Interop.Console,
JetBrains.Platform.Interop.dotMemoryUnit.Interop.Ide,
JetBrains.Platform.RdProtocol, JetBrains.Psi.Features.Core,
JetBrains.Psi.Features.Cpp .Src.Core, JetBrains.Psi.Features.src,
JetBrains.Psi.Features.Tasks, JetBrains.Psi.Features.UnitTesting,
JetBrains.Psi.Features.Web.Core, JetBrains.ReSharperAutomatio
nTools.src.CleanupCode,
JetBrains.ReSharperAutomationTools.src.CommandLineCore,
JetBrains.ReSharperAutomationTools.src.CommandLineProducts,
JetBrains.ReSharperAutomat ionTools.src.DuplicatesFinder,
JetBrains.ReSharperAutomationTools.src.InspectCode, MO.CleanCode]

How can I fix this "Set-SecureBootUEFI : Incorrect authentication data: 0xC0000022" error?

I used the tutorial and the PowerShell scripts in UefiSecureBootManualTests.zip(EnableSecureBoot.ps1 and append_LostCA_db.ps1) found here to sign an .efi file and enable SecureBoot to see if the system boots(it all worked well).
Now I'm trying to take the winload file from system32, sign it using the same scripts, and then overwrite the keys and see if SecureBoot lets me boot only with the winload I signed.
This time I am using the same scripts, except I modified Set-SecureBootUEFI command in the append_LostCA_db.ps1 deleting -AppendWrite parameter so it can overwrite.
But now I am receiving an error:
Set-SecureBootUEFI : Incorrect authentication data: 0xC0000022
At F:\SecureBoot\AllowNewCertificate\suprascriu_LostCA_db.ps1:13 char:5
+ Set-SecureBootUEFI -Name db -Time 2011-05-21T13:30:00z -ContentFilePath Lost ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (Microsoft.Secur...BootUefiCommand:SetSecureBootUefiCommand) [Set-Secu
reBootUEFI], UnauthorizedAccessException
+ FullyQualifiedErrorId : SetFWVarFailed,Microsoft.SecureBoot.Commands.SetSecureBootUefiCommand
How can I fix this?
I am using a HP desktop with Win8.1 x64
LATER EDIT: It would REALLY help if someone could give me an unsinged winload for 8.1 x64
One of the things that these signatures tell you is that the content has not been modified(that means it is still secure/valid/trustable). So that is the reason why I could not sign a file already signed(the loader used at boot and signed by Microsoft). That's why I was getting the UnauthorizedAccessException.
There is no workaround for this.

Windows 8.1 | Code d'erreur : 0x80073712

When I try to enable IIS, Windows PowerShell 2.0 (this what I really need because SQL server needs it), I get the following error:
Code d'erreur : 0x80073712
I tried all solutions that I found on the Internet like:
http://windows.microsoft.com/fr-xf/windows-8/windows-update-error-0x80073712
but no luck. Help please.