How to change the culture of system in Windows Server 2008 R2? - powershell

I have tried using Set-Culture, but I found that this module is not available in powershell. I have have tried upgrading powershell, but this module is still not available.
Can anyone help me find another solution without using Set-Culture?

Related

Powershell Solution: Run modules not supported on a older version of Powershell

I'm currently trying to remote to multiple servers that are on PowerShell 4.0 whereas the local computer currently runs on 5.0+. I am attempting to query servers that are Server 2016 for the Local Administrator group, but will fail for servers that are on 2012. Which upon researching the error messages for cmdlets from Microsoft.Powershell.LocalAccounts indicates that the modules don't exist for 2012.
Rather than updating the PowerShell version, or installing the modules to each server, I wondering if it's possible to execute cmdlets from the local 2016 into remote sessions of the 2012 servers.
Technically, yes, you could copy modules from the local server to one of the module directories on the remote server's $env:PSModulePath and import them in the remote session, but as #mklement0 stated there is no guarantee current modules will work with PowerShell 4.0, let alone Server 2012.
That said, Microsoft.PowerShell.LocalAccounts is a module provided by PowerShell 5.1, not the OS, and the features should still work on 2012. However, I don't have a 2012 instance I can test with. But you may be able to get your task done by upgrading your servers' PowerShell version to PowerShell 5.1 (Windows Management Framework 5.1) to leverage the additional features and built-in modules this version brings. But any modules that are shipped with later Windows versions and not PowerShell itself will remain unavailable.
$localAdminUsers = net localgroup administrators
After some talking with a colleague, I realized I had overcomplicated my script, when I could have used the command prompt. From there, I parse the string for the users I was looking for.
Thank you for your responses.

Sending Email from Classic ASP on Windows 2012 R2 Server Core

We have a classic ASP application we just migrated from Windows 2008 R2 to Windows 2012 R2 Core.
Apparently Core versions of windows don't include cdosys or cdonts and thus our application can no longer send email.
Most of the advice I can find suggests using system.net.mail for sending email which of course is a .NET technology and we're using classic ASP.
We do have .NET on our system but I'm not sure if classic ASP could talk to a .NET page for sending email?
Besides using a 3rd party COM utility like Persits ASPEmail are there any native ways of working around this?
We do NOT want to convert the server core instance to the full version of windows. That's killing an ant with a bazooka. This is only impacting two places in our code and everything else works just fine on core.
Unfortunately, CDONTS was superseded by CDOSYS some time ago. When migrating from Windows Server 2008 to Windows Server 2012 I had this exact same issue, but managed to find a fix.
It involves taking a copy of the cdonts.dll file from the Windows Server 2008 Server and adding it to the Windows Server 2012 server then registering it with the relevant COM subsystem without any need to change code or install a 3rd Party library.
Hopefully the same method will work with Core but I haven't tested it.

Manage web farms from powershell v3.0

I have been searching for a way to create new web farms add add servers to it with PowerShell.
I stumbled on this link http://www.iis.net/learn/web-hosting/microsoft-web-farm-framework-20-for-iis-7/web-farm-framework-20-for-iis-cmdlets-for-windows-powershell which says that you should add a snapin called WebFarmSnapin.
But this does not seem to work at all in powershell v3.0 because it only says:
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 3.
Does anyone know how to manage web farms in PowerShell v3.0?
At last I found a way to do this!
http://brentdacodemonkey.wordpress.com/2014/02/12/automating-arr-configuration/
You can generate a script from the Configuration Editor in IIS Manager. But the funny thing is that on my Windows 7 machine I could not generate PowerShell scripts. I had to do it directly on the 2012 server.

Can I install WIndows Management Framework 3 on WS 2008 r2 using PowerShell

Can I use PowerShell to script an install of this? I already use module PSWindowsUpdate and would like to install KB2506143-x86 but it is not available as an update in get-WUInstall -KBArticleID. Need to run this on hundreds of machines and would like to avoid manually updating each from a browser.
Many thanks,
I think this is not possible due to
Close all Windows PowerShell windows.
paragraph in install instructions.
Microsoft makes a supported product to correctly deal with your problem, why are you trying to solve it with a homebrewed script?

Error when installing SQL Server 2012 Express

When I attempt to install SQL Server 2012 Express, I get an error
However, I have installed service pack 1. BTW, I am using windows 7.
Could someone help me?
My best guess is that you're trying to install 64bit Sql Server on 32bit Windows 7. Other than that, make sure you right click and choose "Run as Administrator" when starting the installer, and that your copy of Windows evaluates as "genuine".
Sql Server also requires .Net and PowerShell, but if either of those were the problem I would expect to see a different error, or even just a prompt to allow them to be included with this installation.