Win10恢复模式cmd下卸载驱动

I ran into following error with pnputil -e on the latest Windows 10 repair console:

No published driver packages were found on the system

I had to use dism

Listing drivers:

dism /image:c:\ /get-drivers

Removing a driver:

dism /image:c:\ /remove-driver /driver:oem#.inf

Use list vol inside diskpart to get the assigned drive letter of your windows partition and replace /image:c:\ with it

原文链接:https://superuser.com/questions/621604/how-to-uninstall-a-driver-from-recovery-console

Run RouterOS in Azure

Yes, it’s possible to have a (virtual) MikroTik router in the cloud.

MikroTik provide a version of RouterOS which supports the x86-64-bit architecture and can be used on most of the popular hypervisors such as VMWare, Hyper-V, VirtualBox, KVM and others. This version name is MikroTik CHR, (Cloud Hosted Router).

By default in the MS Azure marketplace there are no MikroTik appliance templates, but you can create custom OS images to deploy a virtual machine.

1. Step

Download the CHR VHDX image from MikroTik. https://mikrotik.com/download

download chr vhdx image

2. Step

Azure supports only VHD files to create OS images. Convert VHDX image to a VHD! For this, use Powershell and use fixed type virtual disk!

Convert-VHD -Path C:\temp\chr-6.46.7.vhdx -DestinationPath C:\temp\chr-6.46.7.vhd -VHDType Fixed

3. Step

In Azure you will need to create a storage account: (use Azure CLI in your terminal) If you prefer GUI, you can do this few steps on Azure portal, the parameters are the same.

az storage account create --name chrteststorageaccount --resource-group DemoRSC

If it’s successfull, you have to create a container within the storage account. There will be uploaded the VHD image.

az storage container create --name imagecontainer --account-name chrteststorageaccount

4. Step

Upload the CHR image. (use your own account key instead of xxxx) The new VHD must be a page blob.

az storage blob upload --account-key xxxx --account-name chrteststorageaccount --container-name imagecontainer --file C:/temp/chr-6.46.7.vhd --name chr-6.46.7.vhd --type page

5. Step

Create an OS image from the uploaded image: (CHR image only supports Hyper-V generation 1, ‘V1’ virtual machines)

az image create --name chr646image --resource-group DemoRSC --location northeurope --os-type linux --hyper-v-generation V1 --source https://chrteststorageaccount.blob.core.windows.net/imagecontainer/chr-6.46.7.vhd

6. Step

Finally deploy a VM from the image: (select a cheap vm size, Standard_B1ls is more than enough and it’s only 4EUR / month)

az vm create --name CHRVM --resource-group DemoRSC --location northeurope --size Standard_B1ls --image chr646image --admin-username username --admin-password Apple123456789@ --nsg-rule SSH

7. Step

Get the VM’s public IP address and connect via SSH:

$ip = az vm show -d --resource-group DemoRSC --name CHRVM --query publicIps -o tsv
ssh username@$ip
No alt text provided for this image

Winbox is also working, but for this, first you have to create a rule in the automatically-created network security group, which controls the VM’s network traffic. The network security group belongs to the VM’s network interface resource not the VM, so this configuration is a littlebit easier on GUI.

No alt text provided for this image

Create an inbound rule for Winbox 8291 port.

No alt text provided for this image

Now you can connect to the CHR’s public IP with Winbox and SSH too.

Enjoy your MikroTik router in Azure! 🙂

(Configure interfaces, IP addresses and routes are a littlebit complex but not impossible. You have to know how Azure networking works. See my next article!)

WARNING: Winbox and SSH with username/passsword via a public IP address is very unsecure but it’s just a demo. Secure your connections in productional environment!

原文地址:https://www.linkedin.com/pulse/run-routeros-azure-p%C3%A9ter-kov%C3%A1cs?trk=public_profile_article_view

HowTo: Repair Windows 7 Install After Replacing Motherboard

So you’ve installed a new motherboard and now your existing, installed copy of Windows 7 won’t boot, failing somewhere before the logo finishes displaying with a quick blue screen? Well here’s one way to fix it.

You will need:

  • Your motherboard drivers. Use CPUID(CPU-Z) to find the model number if you don’t have it handy.
  • The archive program “7-Zip” available from http://www.7-zip.org/ installed.
  • A CD writer and a blank CD or a thumb drive or a USB hard disk
  • Your Windows 7 install disc if you already tried the system repair option, or the system repair option on the Windows boot options screen if it is there.
  • Another, working, computer.

Get your motherboard drivers downloaded from the manufacturer’s website. If you don’t know the model number you can use CPUID and locate the model number and manufacturer on the “Mainboard” tab:

CPU-Z Mainboard Tab

In this example, the manufacturer is MSI (Micro-Star International), so we can get the drivers by a quick Google search for “MSI Motherboard Driver Downloads.” The primary one you need is the IDE/AHCI/SATA driver files. After they’ve finished downloading, you need to extract them to a folder. You can do this by right clicking and selecting 7-Zip -> Extract to <Name of Driver Download>:

7-Zip Contextual Extract to Folder

Copy the extracted folder to a CD, thumb drive, or external USB drive.


Go to the broken Windows 7 machine. Either load the system repair option or boot off your Windows 7 install disc. Once it boots, select your language and other things and hit next:

Install Windows - Language Selection

At the bottom of the window is an option that says “repair”, click this:

Install or Repair Windows

It will scan your drives, hopefully showing your Windows drive. If so, let it try to repair automatically at least once. Come back to this point if that fails. You can click “no” here, and it will drop back to the window that shows your Windows hard drive. Make sure the top radio button is selected and click next. It should bring up a list of links that you can click, the bottom one is “recovery console”, click that:

System Recovery Options

Eject the Windows disc and put in the CD you burned if you burned one. You need to figure out which drive your CD / thumb drive / external drive is – so try different drive letters and type dir until you see the one that has your folder. If you burned a CD, chances are it’s the D: drive (unless it was an HP or something, then it will be E:) if it’s a thumb drive or external hard drive and you only have 1 CD-ROM, it’s the E: drive. Maybe F: – check it out. We might add a guide on how to do this at a future date.

Once you have that figured out you need to type this

dism /image:c:\ /add-driver /Driver:X:\ /recurse

Replace “X” with the drive letter from the previous step:

Command Prompt

Hit enter and it should find the drivers you extracted into the folder in the second step.

After it does that, type “exit” and hit enter, then press the “Restart” button.

When Windows boots it will take a LONG time to get all the updated drivers – but hey, it booted, right?

原文链接:http://www.dowdandassociates.com/blog/content/howto-repair-windows-7-install-after-replacing-motherboard/

SharePoint 2019 AppFabric分布式缓存服务反复崩溃

Question

Hey People,

yup, my Distributed Cache service keeps crashing about 3 minutes after it starts.

This is a fresh, single-server (separate SQL) SP2019 Farm, it includes the Jan 2019 CU.

The service is using the SPFarm account, which is in the WSS_WPG group – which has permissions for the Distributed Cache.

I’ve done some network sniffing and there’s no sign of it trying to do a CRL check.

I’ve unprovisioned and reprovisioned it multiple times.

What am I missing?

Thanks
Craig

Event log errors:

Log Name:      Application
Source:        .NET Runtime
Date:          15/01/2019 11:13:28 AM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CTASPS19A01D.chapmantripp.co.nz
Description:
Application: DistributedCacheService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.ApplicationServer.Caching.DataCacheException
   at Microsoft.ApplicationServer.Caching.DistributedObjectManager..ctor(Microsoft.ApplicationServer.Caching.EndpointID[], Microsoft.ApplicationServer.Caching.ServiceConfigurationManager, Microsoft.ApplicationServer.Caching.WcfServerChannel)
   at Microsoft.ApplicationServer.Caching.ServiceLayer.ServiceStart(Boolean)
   at Microsoft.ApplicationServer.Caching.DataCacheServiceBase.ServiceStart(Microsoft.ApplicationServer.Caching.ServiceConfigurationManager, Boolean)
   at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartService(Boolean)
   at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartServiceCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

and Log Name:      Application
Source:        Application Error
Date:          15/01/2019 11:13:28 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CTASPS19A01D.chapmantripp.co.nz
Description:
Faulting application name: DistributedCacheService.exe, version: 1.0.4632.0, time stamp: 0x4eafeccf
Faulting module name: KERNELBASE.dll, version: 10.0.14393.2636, time stamp: 0x5bda7edc
Exception code: 0xe0434352
Fault offset: 0x0000000000034048
Faulting process id: 0x1e98
Faulting application start time: 0x01d4ac55eed9e9e6
Faulting application path: C:\Program Files\AppFabric 1.1 for Windows Server\DistributedCacheService.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 1f2b476d-1aae-47e2-b265-c2f8b260ada6
Faulting package full name: 
Faulting package-relative application ID: 

Answers

Try running this.

Use-CacheCluster

# Stop the Caching Services on all cache hosts in the cluster.
stop-cachecluster

# Export existing cache cluster configuration
Export-cacheclusterconfig -file c:\temp\appfabconfig.txt

# make a copy of "appfabconfig.txt" and name it "appfabconfig2.txt"
# Edit appfabconfig2.txt
# Change <caches partitionCount="256" to "128"

# Import the changes.
Import-cacheclusterconfig c:\temp\appfabconfig2.txt

# Start the Caching Services on all cache hosts in the cluster.
Start-cachecluster

# Stop the Caching Services on all cache hosts in the cluster.
stop-cachecluster

# Import the original settings
Import-cacheclusterconfig c:\temp\appfabconfig.txt

# Start the Caching Services on all cache hosts in the cluster.
Start-cachecluster

原文链接:https://social.technet.microsoft.com/Forums/en-US/43f90535-bf67-4bc6-aabe-bdda856e0292/distributed-cache-service-keeps-crashing-on-start-up?forum=SP2019

IIS10下http强制跳转https最佳方式

The IIS URL Rewrite Module 2.1 for IIS7+ may be your friend. The module can be downloaded from IIS URL Rewrite. Using the URL Rewrite Module and URL Rewrite Module 2.0 Configuration Reference explain how to use the module.

Once the module is installed, you can create a host wide redirect using IIS Manager. Select URL Rewrite, Add Rule(s)…, and Blank rule.

Name:
Redirect to HTTPS

Match URL
Requested URL: Matches the Pattern
Using: Wildcards
Pattern: *
Ignore case: Checked

Conditions
Logical grouping: Match Any
Condition input: {HTTPS}
Check if input string: Matches the Pattern
Pattern: OFF
Ignore case: Checked
Track capture groups across conditions: Not checked

Server Variables
Leave blank.

Action
Action type: Redirect
Redirect URL: https://{HTTP_HOST}{REQUEST_URI}
Append query string: Not checked
Redirect type: Permanent (301)

Apply the rule and run IISReset (or click Restart in the IIS Manager)

Alternatively, after installing the module you could modify the applicationHost.config file as follows:

<system.webServer>
  <rewrite>
    <globalRules>
      <rule name="Redirect to HTTPS" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
        <match url="*" ignoreCase="true" negate="false" />
        <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
          <add input="{HTTPS}" ignoreCase="true" matchType="Pattern" negate="false" pattern="OFF" />
        </conditions>
        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" redirectType="Permanent" />
      </rule>
    </globalRules>
  </rewrite>
</system.webServer>

原文地址:https://serverfault.com/questions/893315/best-way-to-redirect-all-http-to-https-in-iis