Windows

Net session i net file

C:\Windows\System32>net file | find /i "user"
C:\Windows\System32>net session | find /i "user"
 \\177.25.239.167        user                                      0 00:00:15
C:\Windows\System32>net session \\177.25.239.167  /DELETE
 The session from 197.215.189.1322 has open files.
Do you want to continue this operation? (Y/N) [N]: Y
 The command completed successfully.

Backup baz SQL Server Express i Firebird na Windows

SqlExpress

[code]osql -S server\nazwainstancji -E -Q "BACKUP DATABASE nazwabazydanych TO DISK=’e:\BACKUP_SQL\nazwabazydanych_%date%.bak’ WITH FORMAT" >> e:\BACKUP_SQL\nazwabazydanych_%date%.txt
forfiles /m *.* /p e:\BACKUP_SQL\ /c "cmd /c del @file " /d -4 [/code]

Firebird

[code]"C:\Program Files (x86)\Firebird\Firebird_2\bin\gbak" -user user1 -password test -b >> C:\data\Z.gdb e:\backup\data\Z_%date%.gbk
forfiles /m *.gbk /p e:\backup\data\ /c "cmd /c del @file " /d -4[/code]

Ściąganie z FTP

[code]"C:\Program Files (x86)\GnuWin32\bin\wget.exe" -N -r –tries=5 –ftp-user >>backup –ftp-password password_ftp –no-dns-cache ftp://ip_ftp/zasób/ 2>> c:\skryptybackup\backup.log[/code]

GPO i Pulpit zdalny na lokalnych PC

Ciężko było, ale się udało 🙂
Punkt 8.
Enter “Remote Desktop Users” Note: don’t click the “Browse” button because you’re on a Domain Controller (well more than likely anyway) and you don’t want to choose BUILTIN\Remote Desktop Users, which is where the browse button will take you, you want to edit the membership of the local “Remote Desktop Users” group on each PC) and click OK

http://www.seanlabrie.com/2011/use-group-policy-to-enable-remote-desktop-connection-on-a-group-of-pcs/

Remote Server Licensing Fix, Windows Server 2003

Po usunięciu klucza rejestru istotne jest uruchomienie programu z uprawnieniami administratora.

  • Click on the Start button and in the search box type “regedit” (without the quotes)
  • The Regedit program should be highlighted at the top of the start window.  Either simply hit ENTER, or double click it.
  • In Regedit, navigate to the following key:  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing
  • Right click on the key name “MSLicensing” and select DELETE.
  • Close Regedit
  • Do NOT open any shortcuts for Remote Connections at this point.  Instead, you need to open the Remote Desktop Connection Manager.  It’s VERY important that you do this by RIGHT clicking on the program and selecting “Run as administrator.”  If you don’t do this properly, the registry key you deleted in step 4 will not be recreated.  The Remote Desktop Connection Manager can be found at: START/All Programs/Accessories/Remote Desktop Connection.
  • Select the remote connection you want to use and click “Connect.”  If you’ve done this properly, a new registry key will be added that will have updated licensing information.

Źródło: http://jeffpicard.com/blog/computer-fixes/microsoft-remote-desktop-licensing-fix/

Czyszczenie profilu domenowego – ProfileList

To clear user local profile via registry:

  1. Press on Start > Run >Regedit
  2. Navigate to the following registry key :“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  3. Under ProfileList navigate to binary key’s like this: S-1-5-21-3656904587-1668747452-4095529-500
  4. On the right side under ProfileImagePath you’ll see the profile path.
  5. Chose the one with the desired user and delete the long registry key like: “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList”

Sprawdzone też na serwerze terminalowym pod Windows Server 2012 R2

Czyszczenie bufora wydruku – Windows

Opis problemu: po wejściu w „Urządzenia i drukarki” Eksplorator się zawiesza. Przyczyna  to 47000 zadań w kolejce niedziałającej drukarki.

Rozwiązanie:

do pobrania skrypt

@echo off
 echo Czyszczenie bufora wydruku
 net stop spooler
 echo Trwa usuwanie dokumentow w kolejce drukowania
 del /q /f /s "%systemroot%\system32\spool\PRINTERS\*.*"
 net start spooler
 echo Pomyslnie wykonano wszystkie czynnosci
 pause

źródło

 

Jak zmienić lub wyczyścić nadmiarowe profile sieci w Windows 7?

Wszystko ładnie opisane:

To merge, delete, rename or change the icon for network locations in Windows 7….

1) Open the „Control Panel”

2) Select and open „Network and Sharing Center”

3)Click on the „Icon”(a house icon for me) under „View your active networks”. This will open the „Set Network Properties” dialogue. Here you can rename a network connection or change the icon for that network connection.

4)Click on „Merge or Delete Network Locations” to see a list of stored network connections. You can merge or delete connections here as well as see if a network connection is in use and managed or unmanaged.

I found the need for this myself as I had my current internet connection being called out as „Network 4”. I wanted to find out what happened to Networks 1,2 & 3. I deleted all but my active Network as this is a Desktop system with one internet connection. I renamed it From Network 4 to my ISP’s name.

źródło