Unable to share S2D Cluster - windows

I am creating a session farm for UPD's and seem to be at a loss when it comes to creating the share for the cluster. I double check all my steps from this link
https://technet.microsoft.com/en-us/windows-server-docs/compute/remote-desktop-services/rds-storage-spaces-direct-deployment
The very last cmdlet is where it fails when building the share.
PS C:\Windows\system32> New-SmbShare -Name UpdStorage -Path C:\ClusterStorage\Volume1\Data
New-SmbShare : The resources must be online on the same node for this operation
At line:1 char:1
+ New-SmbShare -Name UpdStorage -Path C:\ClusterStorage\Volume1\Data
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_SMBShare:ROOT/Microsoft/Windows/SMB/MSFT_SMBShare) [New-SmbShare], CimException
+ FullyQualifiedErrorId : Windows System Error -2147018963,New-SmbShare
When I go to share the folder manually I recieve this error.
The error occured while trying to share Data. The resource must be online on the same node for the operation.
The shared resource was not created at this time.
I have confirmed that both nodes are online, I have attempted this on both nodes to recieve the same error as well. I have added the "SYSTEM" account to full control and inherited all the way down and that has not helped. Anyone have any idea's? This is on a 2016 Server in Azure.

In Failover Cluster Manager, which node is the owner of the CSV? Log on to that node and run the cmdlet there.

Related

docker.exe - This application could not be started

Installing Docker Desktop version 3.1.0 on Windows 10 with WSL 2.
On first time running command docker --version it returns
docker.exe - This application could not be started
and a pop-up
which leads me to
https://learn.microsoft.com/en-us/dotnet/framework/install/application-not-started?version=(null)&processName=docker.exe&platform=0009&osver=7&isServer=0&shimver=4.0.30319.0
I checked my .Net Version its fine and up to date.
And Next time I try to run docker command it returns
Program 'docker.exe' failed to run: Access is deniedAt line:1 char:1
+ docker ps
+ ~~~~~~~~~.
At line:1 char:1
+ docker ps
+ ~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
So this might be the issue of Permission, I couldn't agree more.
So I added my current Authenticated User in docker-users In-fact I added almost all the possible users in docker-users.
Still no luck
Then I gave Read Write permissions also, to all possible users.
But still no luck.
One very clear Solution, Re Install the Windows which I want to use as Last resource.
Jump in the dark will be appreciable
Thanks in advance 🙏

Unable to execute Get-NLBClusterNode remotely powershell

I've created a small cluster of 2 win servers in a domain and another for the remote executions.
I am able to run Get-NlbClusterNode locally on each of the servers.
I can establish remote session with the 2 nodes and have all the permissions in place.
I can run Get-NlbClusterNode command remotely if only one of the servers is in the cluster, but when both are in the cluster I get:
PS C:\Windows\system32> Invoke-Command -ComputerName 10.10.10.9 -ScriptBlock { Get-NlbClusterNode } -credential $Creds
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
+ CategoryInfo : PermissionDenied: (Microsoft.Netwo...tNlbClusterNode:GetNlbClusterNode) [Get-NlbClusterN
ode], UnauthorizedAccessException
+ FullyQualifiedErrorId : Access denied.,Microsoft.NetworkLoadBalancingClusters.PowerShell.GetNlbClusterNode
+ PSComputerName : 10.10.10.9
Is this the so called powershell double hop issue? How could be this fixed?
Thank you

Powershell script for bulk updating Windows Updates on many pc's

I have this script:
Invoke-WUJob -ComputerName comp-1,comp-2,comp-3 -Script {ipmo PSWindowsUpdate; Get-WUInstall -Install -AcceptAll | Out-File C:\PSWindowsUpdate.log } -Confirm:$false -Verbose –RunNow
and after execution I get this:
Invoke-WUJob : PSWindowsUpdate module missing on destination machine
At line:1 char:1
+ Invoke-WUJob -ComputerName 1002-hk-ws-001,1002-hk-ws-002,1002-hk-ws-0 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Invoke-WUJob], Exception
+ FullyQualifiedErrorId : ModuleMissing,PSWindowsUpdate.InvokeWUJob
I used these commands below on every PC to install to PSWindowsUpdate and setup winrm and it still does not work:
winrm quickconfig -q
winrm set winrm/config/client ‘#{TrustedHosts="comp1,comp2,comp3"}’
Set-ExecutionPolicy RemoteSigned
Install-Module PSWindowsUpdate -Scope CurrentUser -Force
Any ideas?
the windows update cannot use remotely, maybe the hardening, you could work with a schedule task Register-ScheduledJob -scriptblock { get-windowsupdate -acceptall}
I am going to assume that you are in a workgroup mode, vs Domain joined machines by virtue of what you said you did on each host.
You have to be an admin on the target to run this.
about_Remote_Requirements
Unless you make additional configs.
You Don’t Have to Be An Administrator to Run Remote PowerShell Commands
Thus, you need to pass credentials in your code, if you are not already running your PowerShell session with admin creds for the remote targets. This is really PowerShell remoting 101 and a well-documented use case.
Your error is saying the module is not on the remote host or can't be found.
Windows updates are a machine-level thing. So, the import should be to the AllUsers PowerShell profile not some individual user of the machines. There is extra work to get PSRemoting working on workgroup systems. For domain-joined, hosts, you can enable it using GPO. No need for extra steps.
See the steps here:
Enable PowerShell Remoting on a standalone (workgroup) computer
Running code on remote systems will always run in the user context that you started, regardless of who is on the remote target.
Ok so now I'am getting a different error :
Invoke-WUJob : You can not find requested file . (Error HRESULT: 0x80070002)
At line:1 char:1
+ Invoke-WUJob -ComputerName 1002-ski-ws-003,1002-ski-nb-002 -Script {i ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WUJob], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,PSWindowsUpdate.InvokeWUJob
I've installed everything on remote machines to : Windows\System32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate but it looks like it still does not see the module ?

Windows service on docker does not start

I've created a C# WCF Windows service app in VS 2017 and added Docker Support.
The following Dockerfile was created:
FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709
ARG source
WORKDIR /app
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["C:\\WcfService.exe"]
When I build it using docker-compose in VS I get an error:
Cannot start service from the command line or a debugger. A Windows
Service must first be installed (using installutil.exe) and then
started with the ServerExplorer, Windows Services Administrative tool
or the NET START command. The program '[2172] WcfService.exe' has
exited with code 0 (0x0).
I've opened PowerShell and typed docker ps - the container is running.
So I used New-Service command and to create "TestService".
When I use Get-Service to see all services, I can see it in the list in 'Stopped' mode.
When I use Start-Service TestService I get the following error:
Start-Service : Failed to start service 'TestService (TestService)'.
At line:1 char:1
+ Start-Service TestService
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController)
[Start-Service], ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
Tried to find info but nothing works. Any ideas?
Ok, so I took Jeroen's advice and dug deeper to see the event viewer. I used some filters on the 'Get-EventLog' command to get the relevant error line and stored it in a variable
$A = Get-EventLog -LogName System -Newest 10 -Source "Service Control Manager" | Select *
Then, I formatted it nice using something like:
$A | Format-List -Property *
and got the exception.
Apparently it has something to do with a C++ dll my app is using. It could be missing or the environment has trouble running it, but that's another issue which I believe I can solve.
Hope that helps others running into similar issues. Thanks.

App Fabric: Method not found: 'System.String Microsoft.ApplicationServer.Caching.Utility.GetInstallPathFromRegistry()'

I am attempting to install App fabric on a Windows Server 2008 R2 VM.
Here are the steps taken:
Created file share accessible to Network Service
Ran WindowsServerAppFabricSetup_x64.exe
Disable Automatic Microsoft Updates
Installed:
Caching Services
Cache Client
Cache Administration
Checked “Set Caching Service Configuration”
Selected XML Provider
Set file share
Use default ports
Installed Hotfix AppFabric1.1-RTM-KB2716015-x64-ENU.exe
Rebooted Server
Started AppFabric Caching Service
But when I run the 'App Fabric Caching Administration PS' as Administrator I get the following error:
Connect-AFCacheClusterConfiguration : Method not found: 'System.String Microsof
t.ApplicationServer.Caching.Utility.GetInstallPathFromRegistry()'.
At line:1 char:100
+ Set-ExecutionPolicy AllSigned Process;Import-Module DistributedCacheAdministr
ation;Use-CacheCluster <<<<
+ CategoryInfo : NotSpecified: (:) [Connect-AFCacheClusterConfigu
ration], MissingMethodException
+ FullyQualifiedErrorId : System.MissingMethodException,Microsoft.Applicat
ionServer.Caching.Commands.ConnectAFCacheClusterConfigurationCommand
PS C:\Windows\system32>
Any suggestions what the issue may be?

Resources