Tag Archives: Windows 10

Windows 10 – SMB Guest access denied by default

Windows 10 now, by default, denies an SMB client from connecting to an SMB server with “guest access”.  See:

https://support.microsoft.com/en-us/help/4046019/guest-access-in-smb2-disabled-by-default-in-windows-10-and-windows-ser

The temporary fix is to change the registry to allow guest account access

With windows regedit I set :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
“AllowInsecureGuestAuth”=dword:1
(by default this is set to “0”)

 

 

 

Windows 10 – Creating Image for Windows to Go external disks

In 2018 we started using “Windows to Go” on externally boot-able disks to provide the “windows” half of a dual-boot mac. To make this work you need to do the following …

1) Purchase really fast external SSD drives of sufficient size. We choose 250 GBs Samsung T3 drives like:
https://www.samsung.com/us/computing/memory-storage/portable-solid-state-drives/portable-ssd-t3-250gb-mu-pt250b-am/

2) Create your windows environment on a computer that has a removable internal SSD drive. Check this carefully before you begin as most new hardware is coming with SSD system drives soldered to the motherboard! Also be sure that your image is “sysprepped”! See additional tips on preparing a system for imaging/cloning at: https://sites.williams.edu/lj1/labs/windows-10-imagining-tips/

3) Once sysprep has run and shutdown the system, remove the internal hard drive from the computer. Using a sata to usb hard drive docking station like: https://www.amazon.com/s?k=sata+to+usb+Hard+Drive+Docking+Station&i=electronics&ref=nb_sb_noss_2
Mount the sysprepped, internal drive on a different computer that has Microsoft WAIK installed. (Use the version of WAIK that matches the Windows version you are cloning!)

4) Attach another external SSD drive just regularly formatted for windows data. This will be a “Scratch” drive.

5) Run Windows update on your computer for any updates that could interrupt your process!

6) Set your Power and Sleep settings to NEVER sleep either computer or display. This process can take a long time!

7) Now determine all your drive letters. I will use C:\ for the current system where everything is attached, E:\ for the internal drive to take an image from in the drive dock, and S:\ for the scratch disk.

8) Create some directories. You will want to create:
C:\MyImageDir …. to receive the wim image you will be creating
S:\Scratch …. to hold the scratch files

9) With WAIK installed, the internal drive from your system to be cloned, and your scratch drive all attached ….
Find the Windows Kits in the Start Menu then open “Deployment and Imaging Tools Environment” with right-click and “Run as Administrator”. This opens a command window with elevated privileges.

10) To create the wim image in the opened command window you opened above, enter this command:

DISM /Capture-image /ImageFile:C:\MyImageDir\MyImage.wim /CaptureDir:E:\ /Name:"SomeNameForMyImage" /ScratchDir:S:\Scratch\

11) Wait a really, really long time ! Eventually you will see “Saving Image …” with a percentage in that command window.

12) Once that wim image is complete, you can use it as input to the Windows To Go disk creation process.

Windows – Finding the right Windows ADK

When building a Windows PE (Preinstall Environment) or prepping systems to be imaged and cloned you are going to need a set of tools in the Windows ADK (or older versions of Windows AIK). The trick is that you have to use the correct version of these tools that matches the version of the Windows OS that you eventually want to deploy.

First find which version of the Windows OS you are planning to deploy. Right click on the start menu and select “System”. Find your system version in the “Windows Specifications” section near the bottom of the window.

Next, head over to the Microsoft Windows ADK website and download the corresponding ADK.
https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install

Once downloaded, go on to install the tools. Accepting the defaults is probably your best bet at least for your first try at this.

Windows 10 – Check for service status and restart if not running

from: https://stackoverflow.com/questions/3325081/how-to-check-if-a-service-is-running-via-batch-file-and-start-it-if-it-is-not-r

for /F “tokens=3 delims=: ” %%H in (‘sc query “MyServiceName” ^| findstr ” STATE”‘) do (
if /I “%%H” NEQ “RUNNING” (
REM Put your code you want to execute here
REM For example, the following line
net start “MyServiceName”
)

)

Windows 10 – Get Windows Update Log

Apparently windows 10 changed the windows 10 log format and you now need to run a power shell command to generate the log file as a text file that normal humans can read.

Open Powershell with “Run as Administrator”
give the command:

Get-WindowsUpdateLog

Then wait until all the log files have been found and parsed and you get the PowerShell command prompt back. Below is an example.

If you find that your windows update log goes back to the beginning of time and the resulting text log file is too large to read, you can temporarily move older log files from C:\Windows\Logs\WindowsUpdate

More details see: https://support.microsoft.com/en-us/help/3036646/how-to-read-windows-update-logs-in-windows-10-version-1607

PS C:\Windows\system32> Get-WindowsUpdateLog

Converting C:\Windows\logs\WindowsUpdate into C:\Users\labadmin\Desktop\WindowsUpdate.log …

Input
—————-
File(s):
C:\Windows\logs\WindowsUpdate\WindowsUpdate.20171011.120412.263.1.etl

0.00%100.00%

Output
—————-
DumpFile: C:\Users\labadmin\AppData\Local\Temp\WindowsUpdateLog\wuetl.CSV.tmp.00000

The command completed successfully.

WindowsUpdate.log written to C:\Users\labadmin\Desktop\WindowsUpdate.log

PS C:\Windows\system32>

Windows 10 – System-wide File Type Associations

List current filetype associations with these two different commands:

ftype
or
assoc

Change or create new ones:

Open an elevated command prompt.

  • Use FTYPE {fileType}={commandString} to create a file type and associated command to open the file.
  • Use ASSOC {.fileExtension}={fileType} to associate a file extension with the file type you created.

Example:

FTYPE MyCustomType=C:\Program Files\MyCustomProgram\MyProg.exe “%1”
ASSOC .custom=MyCustomType

These commands can be issued from the KACE server. See the SPSS example there.