Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

2023-04-05

Count files in a folder from Command Prompt / PowerShell

  • Command prompt 
    • dir *.* /a-d | find "File(s)"
    • dir *.* /b /a-d | find /c /v ""
  • PowerShell
    • (Get-ChildItem C:\csv -filter "*.*").Count
    • (Get-ChildItem C:\csv -recurse -filter "*.*").Count recursive search
    • (Get-ChildItem C:\csv -filter "*.*").Count
    • [System.IO.Directory]::GetFiles("c:\Path").Count

2023-01-05

Store location of the opened tabs from Chrome browser / Restore opened tabs from Chrome

Go the the following location:
%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Sessions

To restore your opened tabs to another PC or user copy the files in this locatation to your new device:
Session_*.* and Tabs_*.*

2021-07-27

How to search for special characters in files or folders from Windows Explorer

If you want to find a special character in a filename or folder go to the searchbox and type:

~="@"

This will find any file or folder containing the @ character

2021-04-12

Change wireless network priority from command line

Open a command prompt and enter:

netsh wlan set profileorder name="NetworkName" interface="Wi-Fi" priority=1

Delete network profile / wifi connection from command prompt

Open a command prompt and run the following command:

netsh wlan delete profile name=SSID

If you get the following error:

You do not have sufficient privileges or the profile "YourProfile" on interface "wifi" is a group policy profile.
then try this:
  • stop the WlanSvc service (WLAN AutoConfig)
  • delete all files in the \Windows\wlansvc\Policies folder
  • try again to delete the profile
    • netsh wlan delete profile name=SSID
  • restart the WlanSvc service

2021-01-19

Add a network printer & Set a default printer in VBScript

Set WshNetwork = WScript.CreateObject("WScript.Network")
WSHNetwork.AddWindowsPrinterConnection "\\ServerName\PrinterName"
WSHNetwork.SetDefaultPrinter "\\ServerName\PrinterName"

2021-01-04

Disable ask for password after sleep

Windows 10:

Go to Settings > Accounts > Sign-in Options > Require sign-in and select Never

2021-01-02

Windows Error Reporting folder location

The Windows Error Reporting folder location can be found here:

%LOCALAPPDATA%\Microsoft\Windows\WER

All files inside this folder can be deleted

fix GRUB missing in Windows/Linux dual-boot

Open a command prompt with elevated rights (run as admin) and run:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

To restore to previous settings run:

bcdedit /deletevalue {bootmgr} path \EFI\ubuntu\grubx64.efi delete grub boot

bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi set windows boot

List installed printers from command line / PowerShell

Open a command prompt and run:

wmic printer list brief

Open PowerShell and run:

Get-Printer | Format-List list printers with details

Get-Printer | Format-List Name list printers names

2020-10-21

Excel print to pdf gets the error mandatory field empty

This error occurs when you click on Enable content.

To solve this, you have to go to

Options > Trust Center > Trust Center Settings > Trusted Documents

and click on the Clear button

2020-02-12

Fix: Skype for business error: There was a problem acquiring a personal certificate to sign in

How to fix Skype for business error: "There was a problem acquiring a personal certificate to sign in"

Step 1: Delete sign in information
  • open skype
  • click Delete my sign-in information
  • re-login
Step 2: Delete certificate
  • open a command prompt and run the following command:
    • certmgr.msc
  • Go to Personal/Certificates
  • delete the certificate issued by Communications Server
Step 3: Flush the DNS cache
  • open a command prompt and run the following command
    • ipconfig /flushdns
Step 4: Delete sip folder
  • delete your sip folder:
    • Windows XP
      • go to %USERPROFILE%\Local Settings\Application Data\Microsoft\Communicator<sip_YourEmailAddress>\
    • Windows Vista/7/8/10
      • go to %LOCALAPPDATA%\Microsoft\Communicator<sip_YourEmailAddress>\
    • if you can't find the folder just search in %appdata% for SIP_ and delete that folder (it should look like this: sip_YourEmailAddress)

2020-01-06

Map network drive from command line

Open command line and enter:

net use y: \\ServerName\SharedFolder /persistent:yes

Use the /persistent switch to restore the connection at next logon

2019-08-14

Show / delete Wi-Fi profiles from command prompt

To show the network profiles type:

netsh wlan show profiles

To delete a specified network profile type:

netsh wlan delete profile name="profile name"

To delete al network profiles type:

netsh wlan delete profile name=*

2019-08-13

Notepad header & footer settings

Go to File > Page Setup and enter the commands as you need:

  • &l       Left-align the characters that follow
  • &c      Center the characters that follow
  • &r       Right-align the characters that follow
  • &d      Print the current date
  • &t       Print the current time
  • &f       Print the name of the document
  • &p      Print the page number
  • remove IMG_ from files / rename file from command prompt or PowerShell

    Open command prompt and enter:

    ren "img_*.jpg" "////*.jpg"

    Open PowerShell and run:

    get-childitem *.jpg | foreach { rename-item $_ $_.Name.Replace("IMG_", "") }

    2019-07-31

    Fix Error "The Group Policy Client service failed the logon. Access denied"

    When a specified user tried to login he gets the following error:
    The Group Policy Client service failed the logon. Access denied

    Fix:

    • Control Panel -> System -> Advanced system Settings
    • System Properies -> Advanced -> User Profiles -> Settings
    • Delete the specified user profile (and restart the workstation)


    2019-06-21

    FIX Adobe Reader: A 3D data parsing error has occurred


    • Go to C:\Users\UserName\AppData\Local\Adobe\Acrobat\
    • Here you will find a folder named 2015 or DC which you can rename or delete
      • (eg: 2014.bak or DC.bak)
    • re-open the document