Mostrando postagens com marcador Windows. Mostrar todas as postagens
Mostrando postagens com marcador Windows. Mostrar todas as postagens

Mobile Access SSL Network Extender (SNX) remote users with Windows 11 24H2 fail to connect

 

Cause

The conflict resolution mechanism in Windows 11 24H2 is different than in earlier versions of Windows.

Solution

On the Windows endpoint computer, create a new Windows Registry parameter.

Procedure

  1. On the Windows endpoint computer, open the Registry Editor.
  2. Go to this location:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cpextender
  3. Create a new DWORD entry with the name MetricSetMethod.
  4. Set the value of MetricSetMethod to 1.
  5. Restart the Windows endpoint computer.

Alterar MTU windows server

 

Passos detalhados:
  1. 1. Abra o Prompt de Comando como administrador:
    • Pressione a tecla Windows, digite "cmd" e clique com o botão direito em "Prompt de Comando", selecionando "Executar como administrador".
  2. 2. Descubra o índice da interface:
    • Execute o comando: netsh interface ipv4 show interface (ou netsh interface ipv6 show interface para IPv6).
    • Este comando mostrará uma lista das interfaces de rede e seus índices (Idx). Anote o índice da interface que você deseja modificar.
  3. 3. Defina o valor da MTU:
    • Execute o seguinte comando, substituindo <índice> pelo número obtido no passo anterior:
      • netsh interface ipv4 set interface <índice> mtu=9000 (para IPv4).
      • netsh interface ipv6 set interface <índice> mtu=9000 (para IPv6).
  4. 4. Verifique a configuração:
    • Execute novamente o comando netsh interface ipv4 show interface (ou netsh interface ipv6 show interface) para confirmar que o MTU foi alterado para 9000.
Exemplo:
Se o índice da sua interface IPv4 for 4, o comando seria:
netsh interface ipv4 set interface 4 mtu=9000

Delete windows recovery partition

 Run in terminal as admin:

Diskpart
list disk
select disk 0
list partition
select partition X
delete partition override

Windows Server VSS error ID 513

 

Run in command prompt as administrator.

sc sdshow mslldp

Get the string and paste before (A;;CCLCSWLOCRRC;;;SU) and run

sc sdset mslldp [PASTE STRING HERE] (A;;CCLCSWLOCRRC;;;SU) 

 

Disable SMBV1 on Windows server 2012/2016

 Server side:

Get smbv1 status
get-SmbServerConfiguration
Get-WindowsFeature | Where-Object {$_.name -eq "FS-SMB1"} | ft Name,Installstate

Active audit
Set-SmbServerConfiguration –AuditSmb1Access $true
Applications and Services -> Microsoft -> Windows -> SMBServer -> Audit and see if any clients accessed the file server over SMB1.

Remove SMB1
disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -Remove

Disable SMB1
set-SmbServerConfiguration -EnableSMB1Protocol $False -Force

Enable SMB1
set-SmbServerConfiguration -EnableSMB1Protocol $True -Force


Client side
Test w10

Dism /online /Get-Features /format:table | find "SMB1Protocol" 



Windows Firewall - Allow IP address

In rule 

netsh advfirewall firewall add rule name="Name" dir=in action=allow protocol=ANY remoteip=10.20.0.30

Out rule


netsh advfirewall firewall add rule name="Name" dir=out action=allow protocol=ANY remoteip=10.20.0.30

 

 

How to fix Windows fonts that are poor quality and not smooth

 

Windows 11

By default, the ClearType feature is enabled. However, if you want to customize the text even more, you can run the ClearType Text Tuner by following the steps below.

Press the Windows key on the keyboard.
In the search field at the top of the Start menu, type cttune.exe and press Enter.
 

The Windows ClearType Text Tuner program opens, allowing you to improve the quality of how the text looks on your screen. Click Next on each screen and make the appropriate selections based on the prompts.


Windows Vista, 7, 8 and 10

By default, the ClearType feature is enabled. However, if you want to customize the text even more, you can run the ClearType Text Tuner by following the steps below.

Click Start or press the Windows key on the keyboard.
In the search and run box, type cttune.exe and press Enter.
This action opens the Windows ClearType Text Tuner program, which should resemble the example picture below. This program lets you improve the quality of how the text looks on your screen.


 

How to add a Null route in windows

 

Host: 
route add 8.8.8.8 mask 255.255.255.255 192.168.1.123 if 1 -p
 
Network:
route add 10.20.30.0 mask 255.255.255.0 192.168.1.123 if 1 -p 
 
 

DFSR clean Staging folder

 This particular error is generally experienced when people attempt a non NTFS volume such as ReFS to a DFSR replication group as documented on the following forum.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/8860b354-3bf2-43ed-9acf-07fa43931046/dfsr-replication-cant-be-used-on-a-refs-volume?forum=winserver8gen

 In my case, I experienced this error with DFSR setup on NTFS volume on a new branch server.

The customer moved the DFSR node from one office, to another office.  The C:\ "SYSTEM" volume was formatted and reloaded with a fresh copy of 2012 R2 with latest patches, however the E:\ "DATA" volume was not formatted.  As a result it has its legacy DFSR Database, Staging data etc.

To clean up the staging data I created a new directory in C:\ called "empty":

C:\Empty

I then ran the following commands after stopping the DFSR Replication service on the spoke server:

Robocopy "C:\Empty" "E:\System Volume Information\DFSR" /MIR

Followed by

rmdir "E:\System Volume Information\DFSR"

Starting the DFSR replication service resulted in the error above.

After playing around a bit more, I found that in addition to flushing all data in System Volume Information\DFSR you must also remove the DfsrPrivate link which points to the System Volume Information\DFSR sub directory for DfsrPrivate data.

After doing this, starting the DFS Replication service kicks of its normal DFSR Initial Sync shown by a state of 2:

Wmic /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo get replicationgroupname,replicatedfoldername,state


State Values (Uninitialized, Initialized, Initial Sync, Auto Recovery, Normal, In Error), ValueMap (0, 1, 2, 3, 4, 5)}

Gerenciar usuários por linha de comando no Windows

 Para criar usuários locais com net user, digite:
1
net user nome_usuario senha /add


Substitua nome_usuario e senha pelos dados desejados. Você também pode ir além e
digitar o nome completo e a descrição do usuário com:

1
net user nome_usuario senha /add /fullname:"Nome Completo" /comment:"Descrição do usuário"


Caso queira alterar a senha de um usuário local, simplesmente digite:

1
net user nome_usuario nova_senha


Ou se quiser editar o nome completo ou a descrição, digite:

1
net user nome_usuario /fullname:"Novo nome Completo" /comment:"Nova descrição do usuário"


Utilizando este método, você vai criar usuários “Padrão”, ou seja, sem privilégios
administrativos. Para dar privilégios de administrador para determinado usuário,
simplesmente digite:

1
net localgroup administradores nome_usuario /add
 

Caso tenha pensado melhor e acha que o usuário não merece ser um administrador,
digite:

1
net localgroup administradores nome_usuario /delete

 

 

Windows update error 0x8024500c

Stop windows update service

Type %windir%\SoftwareDistribution\DataStore in this new window and click OK.
 

This will open Windows Explorer on the correct location.
 

Delete all contents of this folder. (Hint: Use Ctrl + A to select all files and folders)

In the new windows you have a navigation on the left side. Use it to navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
 

Once you found it, search for WUServer and WIStatusServer in the right hand pane.


If they are not listet we cannot clean the download path. Othwerwise delete both.
Restart your computer.

 

 

 

Kaspersky Security Center WSUS Files Storage Location

 Kaspersky seems to be storing windows update files on the C Drive:

Here -> C:\ProgramData\KasperskyLab\adminkit\1093\.working

Change folder location with klsrvswch.exe utility. 

You can reach it from the KSC installation folder. Utility named as "Administration Server Account Switch Utility". It seems like just allows you to switch service account, but also allows to change "wsus" folder path. Continue wizard as if you want to switch service account. You don't need to provide a new service account, you can use current. Last step is the place of path change.

 

Rename windows computer command

Command Prompt:

netdom renamecomputer Thecomputernamehere /newname:newnamehere /force /userd:domain\username /passwordd:***** /reboot

 

Powershell:

Example 1: Rename the local computer

This command renames the local computer to Server044 and then restarts it to make the change effective.
PowerShell

Rename-Computer -NewName "Server044" -DomainCredential Domain01\Admin01 -Restart

Example 2: Rename a remote computer

This command renames the Srv01 computer to Server001. The computer is not restarted.

The DomainCredential parameter specifies the credentials of a user who has permission to rename computers in the domain.

The Force parameter suppresses the confirmation prompt.
PowerShell

Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force

 

Fix Remote Desktop Connection "Internal Error has Occurred"

Step 1

Remove the expired RDP cert
Open Certificates (Local Computer)
Expand Remote Desktop --> Certificates
Delete the expired certificate
If there is no cert listed, that is fine.

Step 2

Fix the owner on the corrupt file.
Browse to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys
Locate the file starting with f686aace
Right click and select properties --> Security --> Advanced
Change the owner to "Administrators"  or "SYSTEM"
Click OK
Backup the file (optional)
Rename or delete the file starting with f686aace


Open services
Restart "Remote Desktop Service"

source:
https://levitrares.com/host-https-social.technet.microsoft.com/Forums/ie/en-US/a9c734c1-4e68-4f45-be46-8cae44c95257/unable-to-remote-desktop-to-windows-server-2012-due-to-failed-to-create-self-signed-certificate?forum=winserverTS


Create DHCP scope with powershell

Create scope:

 Add-DhcpServerv4Scope -Name "dhcp.contoso.com" -StartRange 10.110.0.10 -EndRange 10.110.0.250 -SubnetMask 255.255.255.0 -LeaseDuration 8.00:00:00

 

Set scope options:
Set-DhcpServerv4OptionValue -ComputerName "dhcp.contoso.com" -ScopeId 10.110.0.10 -DnsServer 10.110.0.2,10.110.0.3 -WinsServer 10.110.0.2 -DnsDomain "contoso.com" -Router 10.110.0.1

 

Get the modified date with powershell

 

To get the modified date on a single file try:

$lastModifiedDate = (Get-Item "C:\foo.tmp").LastWriteTime

To compare with another:

$dateA= $lastModifiedDate 
$dateB= (Get-Item "C:\other.tmp").LastWriteTime

if ($dateA -ge $dateB) {
  Write-Host("C:\foo.tmp was modified at the same time or after C:\other.tmp")
} else {
  Write-Host("C:\foo.tmp was modified before C:\other.tmp")
} 
 
Get-ChildItem -Path D:\PowerShell\ActiveDirectoryGroupList.csv | select Name,CreationTime
 

Get file version information from the command line

 

PS> (Get-Command C:\Path\To\Thing.dll).FileVersionInfo.FileVersion
3.1.0.2

The version number parts of the File­Version­Info are

Product Field File Field Meaning Example
ProductVersion FileVersion String version 3.1.0.2 (alpha)
ProductMajorPart FileMajorPart First number 3
ProductMinorPart FileMinorPart Second number 1
ProductBuildPart FileBuildPart Third number 0
ProductPrivatePartFilePrivatePartFourth number2

Monitoring response time with curl

   curl -s -o /dev/null -w "Conecction: %{time_connect}s | Start transfer: %{time_starttransfer}s | Total time: %{time_total}s\n" ...

Mais vistos