AppFabric on Windows Server 2016 - "error running cmdlet 'out-lineoutput'" - powershell

Trying to deploy some software that uses AppFabric in IIS. Yes, I already know AppFabric is deprecated; I didn't architect this software, so don't look at me! I also have the CU7 update for AppFabric installed.
I'm on Windows Server 2016 with IIS 10. No matter what I click on involving AppFabric in IIS, I get an error: The method or operation is not implemented.
Opening up the Event logs, I see that the method in question is a PowerShell commandlet: error running cmdlet 'out-lineoutput'. The method or operation is not implemented.
Out-LineOutput allegedly was introduced in PowerShell 5, and I've read that it only exists in regular PowerShell (not ISE). Beyond that, I haven't found any reference to that commandlet in regards to AppFabric.
What's driving me extra nuts is that I have a sandbox machine, also running Server 2016, where everything is working OK. I have confirmed that:
the PSModulePath environment variable is the same on both; and
running Get-Module at a Powershell prompt shows the same modules installed on both.
I've tried uninstalling/reinstalling AppFabric and the CU7 patch, adding my Application Pool Identity(ies) to the AS_Administrators group . . . nothing is working. Help me, Stack Overflow!

It turned out this was due to a registry key entry setting logging. In regedit, go to
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription
Check out the EnableTranscripting property. If this is a 1, change it to a 0.

Related

Powershell doesn't open - error "Path cannot be the empty string or all whitespace"

I'm simply trying to open Powershell on my server. It opens for about 5 seconds and then closes, not showing any error before it closes or anything. The only thing I can see is in the Windows Powershell Event Log is that it gives the following error:
"Settings: Path cannot be the empty string or all whitespace."
I'm running WMF 4, Server 2012 R2, Exchange Server 2016 (not that I think that has anything to do with it). Any other post I've seen when I google " Powershell Path cannot be the empty string or all whitespace" always seems to have to do with someone programming. I'm just trying to open powershell.
Turns out it was a group policy setting, specifically "Computer Configuration\Policies\Windows Components\Windows Powershell\Turn on Powershell Transcripting." It had been turned on in our domain because Powershell V5 is being/has been pushed out to everyone (except for our Exchange Servers). Once I changed the setting on a GPO closer to my Exchange Servers, did a gpupdate, then restarted the server, it started working again just fine.
Also, whoever downvoted my question, would you be so kind to explain why it was downvoted? Or are you just going to be a drive by downvoter?

Internal Server Error in PowerShell cmdlets for Microsoft Dynamics CRM

On Windows Server 2012 Datacenter with Microsoft Dynamics CRM 2016 installed, I want to run a deployment command but for every commands I get this error: "(500) Internal Server Error".
I first run this:
Add-PSSnapin Microsoft.Crm.PowerShell
and it will work fine and when I check it with get-pssnapin and Get-Help *Crm*, every thing is fine and every thing that I need is registered. but when I want to run a cmdlets command like these, I face the error: Get-CrmSetting or Get-CrmCertificate or ...
For example for Get-CrmSetting TraceSettings it give me this error:
How can I solve this problem and error?
Thanks
According to this article, you might want to try:
Get-CrmSetting –SettingType TraceSettings
Here are a couple more items to investigate, from this article:
To use the XRM tooling cmdlets, you need PowerShell version 3.0 or
later. To check the version, open a PowerShell window and run the
following command: $Host
Set the execution policy to run the signed PowerShell scripts. To do
so, open a PowerShell window as an administrator and run the
following command: Set-ExecutionPolicy -ExecutionPolicy AllSigned
Verify the (CRMDeploymentServiceAppPool Application Pool identity) has SQL SEVER SysAdmin permission. This is needed to perform any CRM configuration changes and organizational operations.
Note: it does not matter if the account executing the PowerShell is a system admin or SQL server sysadmin because these operations are executed via the deployment web service.
Deployment Web Service (CRMDeploymentServiceAppPool Application Pool identity)
....Sysadmin permission on the instance of SQL Server to be used for the configuration and organization databases.
....
(500) Internal Server Error, refers to a HTTP response status code. This means that the Powershell command is calling a URL and the URL is reporting a error.
You need to know the URL to really find out what the problem is. One way you can get the URL, is downloading Fiddler Classic. Once installed, you have to enable HTTPS decryption.
In my case the URL was...
https://<my-crm-domain>/XrmDeployment/2011/deployment.svc?wsdl
When I ran this URL on the server where CRM is installed, I got an exception stating...
Could not load file or assembly 'Microsoft.Crm.Application.Components.Application'
All this meant, I needed to copy a file, Microsoft.Crm.Application.Components.Application.dll, from C:\Program Files\Dynamics 365\CRMWeb\bin into folder C:\Program Files\Dynamics 365\CRMWeb\XRMDeployment\bin.
Once this was done, the URL worked and therefor my PowerShell command as well.

Powershell WinRM (WS-manager) service is not running after enabling it in group policy

I need to run remote powershell commands on a 2008 R2 server, so i enabled WinRM using the group policy
but then when i go into windows services to view the running services, the Windows Remote Management (WS-Management) is not on the list
so then when i try to run powershell commands that would setup WinRM
It says that the service is not running, thus i cant register the configuration; which is what i really need since i need to run powershell commands as PS version 2 and not version 3
has anyone encountered this before? does anyone have any idea of where to start looking?
thanks
First, you don't need WinRM or PowerShell remoting to run version 2.0. You just invoke powershell with that version:
powershell.exe -Version 2.0
As to your problem, I am not sure why the service is missing. Since you installed WMF 3/Powershell 3 yourself (I'm assuming, because it's 2008 R2), maybe you can try reinstalling or repairing it? Are there any messages in the event log? I admit I have never seen this before.
Have you used an installer for 2008 R2 that was customized or cut down, like the person who asked this question?

Nservice bus installation on Winserver 2012

I am trying to install nservice bus on a fresh win server 2012 box and things are not working properly. Any help is appreciated..
I get setup failed prematurely and when I dumped into log file.. this is the error I get..
Calling custom action NServiceBus.Wix.CustomActions!NServiceBus.Wix.CustomActions.CustomActions.InstallMsmq
Installing/Starting MSMQ if necessary.
CustomAction InstallMsmqAction returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 16:36:36: InstallFinalize. Return value 3.
Action 16:36:36: Rollback. Rolling back action:
Do I have to manually add MSMQ features.?
Yes you need to enable the MSMQ features first.
BTW, the MSI is really only to be installed on developers machines, to prepare a machine in production use the powershell cmdlets, see http://docs.particular.net/nservicebus/managing-nservicebus-using-powershell
Is your dev machine a WinServer 2012?

"Cannot uninstall Language Pack 0 because it is not deployed" when attempting to uninstall-spsolution on sharepoint 2010 foundation

I continue to get this error message "Cannot uninstall Language Pack 0 because it is not deployed" when running the uninstall-spsolution cmdlet. I've attempted a number of alternate syntaxes to no avail. (tried add -language 1033 for example) I see a few other similar issues on the web, but nothing specifically addressing my issue. I know the solution exists. not sure why the Language Pack issue is arising. (by the way...i can see my solution using Sharepoint manager 2010). I've tried a number of anyway, any help would be appreciated. thanks.
(Note: was unable to upload image of error from powershell command shell due to site restriction).
I'm also seeing this error in one of our farms when I run the Update-SPSolution commandlet. Recently, we updated the farm with foundation and server Service Pack 1, the associated server language packs and the June Cumulative update. By chance, is this the patch level of your farm? Interestingly, I have no trouble running Update-SPSolution in another farm patched to the same level. The bottom-line is that I don't think this is limited to Uninstall-SPSolution or Update-SPSolution.
I just resolved the issue by doing the following:
Checked the solution store and saw that the solution I was updating was not deployed
I attempted to deploy the solution and saw that it was stuck in the deployment stage
From services.msc I stopped and restarted the SharePoint 2010 Timer service and the SharePoint 2010 Administration service. I don't normally stop and start SharePoint services from Services, but that seemed to do the trick. I also don't know whether it's necessary to recycle both of these services.
I then returned to the command line and was able to successfully update the solution.
Please let me know if this works for you.
While I like the answer above and I think it would work some of the time, in my case I had to remove the Errored out WSP from the solution store and then re-add it and then install/deploy it again. After that my updates were working fine again.
I had the same issue, I opened the manage solutions in central admin and there was an error message next to my solution. The error message was actually helpful, it directed me to solve the issue. I have added -force while installing the solution using power shell command then it worked fine.
After that I deactivated and reactivated the feature just in case.
I've got the same problem and restarting the services was not enough for me.
Then, I solved doing:
Retract and then Remove of the wsp from: Central Administration–>System Settings–> Manage farm solutions.
Then, from Powershell, I have canceled the Features with null scope (which were preventing me to install again the package succesfully):
Get-SPFeature | ? { $_.Scope -eq $null }
$feature = Get-SPFeature | ? { $_.Scope -eq $null }
$feature.Delete()
And at the end I have installed again the wsp:
Add-SPSolution -LiteralPath Path
Install-SPSolution -Identity Name.wsp -WebApplication WebApplicationPath –GACDeployment
Then it worked :)
Update: I've just got this problem again, but this time there weren't features with null scope, so it has been enough just to add -Force while installing the wsp.
I had the same issue and after redeploying solution it's gone.