Posts

Showing posts from May, 2021

Windows run as a different user from CMD

 On my journey to fix my dev env I learned some cool trick on how to run stuff in windows as another user, from CMD * For running the .exe files you need to navigate to their folders or run full path The basic operation to run as user is runas /netonly /user:<DOMAIN>\<USER> <COMMAND> So, for example domain is MyDom, and user is OthrUsr - Just open CMD runas /netonly /user:MyDom\OthrUsr cmd - Open PowerShell cd "C:\Windows\System32\WindowsPowerShell\v1.0\" runas /netonly /user: MyDom\OthrUsr  PowerShell.exe - Open SharePoint PowerShell cd "C:\Windows\System32\WindowsPowerShell\v1.0\" runas /netonly /user: MyDom\OthrUsr  PowerShell.exe . "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\CONFIG\POWERSHELL\Registration\SharePoint.ps1" *According to your SP version the "16" might be 15 (for sp13) or 14 (for sp10) - Open SQL Server Management Studio (SSMS)  (path can chage according to version) cd "C:\Progr

new SharePoint 2019 machine - cant login into SQL Server

 We have created a newly win2k16 server with sharepoint 2019, and it worked great... Until I tried to enable apps (SPFx), and I needed to create a Subscription Service, and therefor use the SQLSERVER. Whatever I tried I got these error depending on the test, with PowerShell commands (PS), SQL logs, or Sql Server Management Studio (SSMS). Error: 18456, Severity: 14, State: 5. Login failed for user '<DOMAIN>\<USER>'. Reason: Could not find a login matching the name provided. [CLIENT: <local machine>] Error: 18461, Severity: 14, State: 1. Login failed for user '<DOMAIN>\<USER>'. Reason: Server is in single user mode. Only one administrator can connect at this time. [CLIENT: <local machine>] Error: 18456, Severity: 14, State: 58. Login failed for user '<DOMAIN>\<USER>'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: <local machine>] In t

Setting new SP2019 dev machine for SPFx

I've made this collection for any other time me or you will get a new SP machine for local dev. Create your Web-App and change the hosts file with new value 127.0.0.1 my-webapp Make browser stop asking for credentials endlessly https://sharepoint.stackexchange.com/questions/11792/external-access-continually-prompted-for-credentials#answer-11846 Sometimes you want to enable multi rdp (not multi user, just multi sessions for same user) https://social.technet.microsoft.com/Forums/en-US/c52b6da7-cdf2-4e1f-95d1-6471c6f2f6b0/easiest-way-to-enable-more-than-2-concurrent-rdp-sessions-on-windows-server-2016?forum=winserverTS#1701fa1f-c7fb-4093-a525-8b188e17c440 OR https://help.matrix42.com/020_ESM/MyWorkspace/10MyWorkspace_Guide/HowTo%3A_Enable_multiple_sessions_for_Remote_Desktop_Services#:~:text=Enable%20Multiple%20RDP%20Sessions,-Log%20into%20the&text=Go%20to%20Computer%20Configuration%20%3E%20Administrative,Desktop%20Services%20session%20to%20Disabled. And in that case, enable open

SPFx migrating solution from Online to 2019

 Let me start that is would be much easier to just create a new solution, specify it as an 2019 and copy the code. But I'm an explorer type of man... So I did created another solution for 2019 and copied some files tsconfig.json package.json package-lock .yo-rc.json under /config , I matched the content of those files (dont copy-paste) copy-assets.json package-solution.json Also in all /src/webparts/<someWP>/<someWP>.manifest.json mark this line "supportedHosts" : [ "SharePointWebPart" ], And finally in your code dont use stuff like  public   listDetails :[]=[]  instead just  public   listDetails =[]

SPFx: Can't view Install Errors

Simple solution is to disable "DenyAddAndCustomizePages" to just enable those pages for the site collection NOTICE - its site collection level $tenantUrl = "https://<tenant>-admin.sharepoint.com" Connect-SPOService -Url $tenantUrl $siteUrl = "https:// <tenant> .sharepoint.com/sites/teamsiteexample" Set-SPOSite -Identity $siteUrl -DenyAddAndCustomizePages $false Disconnect-SPOService  You can always change it back to $true