Wednesday, September 26, 2018

Batch Script to get System Information from a Remote Computer

@echo off
if %os%==Windows_NT goto WINNT
goto NOCON

:WINNT
echo .Using a Windows NT based system
echo ..%computername%

REM set variables
set system=
set manufacturer=
set model=
set serialnumber=
set osname=
set sp=
set cstring=
set ustring=
set pstring=

REM Get Computer Name / IP Address
echo ----------------
echo Type in a Computer Name or IP Address and press Enter
set computer=%computername%
set /p computer=[Press Enter For %computername%]
echo ----------------

REM Check If Remote Machine
IF NOT %computer% == %computername% goto remote
goto start

:REMOTE
REM It's A Remote Machine
set cstring=/node:"%computer%"

:USERNAME
REM Get Username
echo ----------------
echo Type in a Username and press Enter (with or without DOMAIN)
set user=%username%
set /p user=[Press Enter For %username%]
echo ----------------

REM Check If Other Username
IF NOT %user% == %username% goto newuser
goto start

:NEWUSER
REM It's A Different User
set ustring=/user:"%user%"

:PASSWORD
REM Get Password
echo ----------------
echo Type in a Password and press Enter (with or without DOMAIN)
set pass=
set /p pass=
echo ----------------

REM Check if password was entered
IF [%pass%] == [] goto nopass
set pstring=/password:"%pass%"
goto start

:NOPASS
REM No password entered
set pstring=

:START
cls
echo Checking connection [Computer: %computer%]...
echo Please Wait....

REM Check connection
wmic %cstring% %ustring% %pstring% OS Get csname

IF %errorlevel% == -2147023174 goto norpc
IF %errorlevel% == -2147024891 goto baduser

echo Getting data [Computer: %computer%]...
echo Please Wait....

REM Get Computer Name
FOR /F "tokens=2 delims='='" %%A in ('wmic %cstring% %ustring% %pstring% OS Get csname /value') do SET system=%%A

REM Get Computer Manufacturer
FOR /F "tokens=2 delims='='" %%A in ('wmic %cstring% %ustring% %pstring% ComputerSystem Get Manufacturer /value') do SET manufacturer=%%A

REM Get Computer Model
FOR /F "tokens=2 delims='='" %%A in ('wmic %cstring% %ustring% %pstring% ComputerSystem Get Model /value') do SET model=%%A

REM Get Computer Serial Number
FOR /F "tokens=2 delims='='" %%A in ('wmic %cstring% %ustring% %pstring% Bios Get SerialNumber /value') do SET serialnumber=%%A

REM Get Computer OS
FOR /F "tokens=2 delims='='" %%A in ('wmic %cstring% %ustring% %pstring% os get Name /value') do SET osname=%%A
FOR /F "tokens=1 delims='|'" %%A in ("%osname%") do SET osname=%%A

REM Get Computer OS SP
FOR /F "tokens=2 delims='='" %%A in ('wmic %cstring% %ustring% %pstring% os get ServicePackMajorVersion /value') do SET sp=%%A

echo done!

echo ----------------
echo System Name: %system%
echo Manufacturer: %manufacturer%
echo Model: %model%
echo Serial Number: %serialnumber%
echo Operating System: %osname%
echo Service Pack: %sp%
echo ----------------

REM Generate file
SET file="%~dp0%computer%.txt"
echo ---------------- > %file%
echo Details For %computer%: >> %file%
echo System Name: %system% >> %file%
echo Manufacturer: %manufacturer% >> %file%
echo Model: %model% >> %file%
echo Serial Number: %serialnumber% >> %file%
echo Operating System: %osname% >> %file%
echo Service Pack: %sp% >> %file%
echo ---------------- >> %file%

echo File created at %file%

REM request user to push any key to continue
pause

goto END

:NORPC
echo ----------------
echo Error...No connection could be made to [%computer%]...
echo Error...Please try again...
echo ----------------
pause
cls
goto winnt

:BADUSER
echo ----------------
echo Error...Access Denied using [%user%]...
echo Error...Please try again...
echo ----------------
pause
cls
goto username

:NOCON
echo ----------------
echo Error...Invalid Operating System...
echo Error...No actions were made...
echo ----------------
pause
goto END

:END

Wednesday, November 29, 2017

How to Increase the maximum file size of ost or pst file

The maximum file size of ost or pst is limited by the registry. We can edit the registry settings to increase this file size. In Outlook 2003 and Outlook 2007, the maximum size of a Unicode pst-file has been limited to 20GB. In Outlook 2010, 2013 and 2016, this limit has been set to 50GB.
To increase the file size we have to edit the following 2 registry values.
MaxLargeFileSize - The MaxLargeFileSize registry entry determines the absolute maximum size that both the .pst and the .ost files can grow to. After this maximum size is reached, Outlook does not permit the size of the file to grow beyond this size.
WarnLargeFileSize - The WarnFileSize registry entry determines the maximum data that both the .pst and the .ost files can have. After this maximum data is reached, neither the .pst nor the .ost files are permitted to add any more data. However, the size of the physical file may still increase because of internal processes.
The location of the MaxLargeFileSize and WarnLargeFileSize may change in Domain and Workgroup computers
For Domain Account
You may have to create the registry values if they do not exist. If the registry values do not exist, follow these steps to create them.
§  Click Start, click Run, type Regedit, and then click OK.
§  In the left pane, expand the following registry key:

Outlook 2003
HKEY_CURRENT_USER\Software\ Policies\Microsoft\Office\11.0\Outlook\PST

§  Outlook 2007
HKEY_CURRENT_USER\Software\ Policies\Microsoft\Office\12.0\Outlook\PST

§  Outlook 2010
HKEY_CURRENT_USER\Software\ Policies\Microsoft\Office\14.0\Outlook\PST

§  Outlook 2013
HKEY_CURRENT_USER\Software\ Policies\Microsoft\Office\15.0\Outlook\PST


§  Outlook 2016
HKEY_CURRENT_USER\Software\ Policies\Microsoft\Office\16.0\Outlook\PST

For Workgroup Users
§  Outlook 2003
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\PST

§  Outlook 2007
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\PST

§  Outlook 2010
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\PST

§  Outlook 2013
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\PST


§  Outlook 2016
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\PST

Ø  Right click on PST , Click New and click DWORD

Ø  Type name as MaxLargeFileSize
Ø  Repeat the same process and create WarnLargeFileSize


Ø  Right Click MaxLargeFileSize and select Modify. Select Decimal and enter the maximum value of the PST. (For example I entered 71680 to increase the PST size to 70 GB).
Ø  Similarly Enter the value for WarnLargeFileSize. (Here I have entered 66560 to set value to 65GB).

Ø  Click OK and close the registry.

Saturday, February 27, 2016

Windows RUN Commands

COMMANDS
APPLICATIONS
appwiz.cpl
Programs and Features
Calc
Calculator
Charmap
Character Map
Chkdsk
Check Disk Utility
Cleanmgr
Disk Cleanup Utility
Cmd
Command Prompt
Compmgmt.msc
Computer Management
Control
Control Panel
Control admintools
Administrative Tools
Control desktop
Personalization
Control keyboard
Keyboard Properties
Control mouse
Mouse Properties
Control netconnections
Network Connections
Control printers
Devices and Printers
Desk.cpl
Screen resolution
Devmgmt.msc
Device Manager
Diskmgmt.msc
Disk Management
Diskpart
Disk Partition Manager
Eventvwr.ms
Event Viewer
Excel
Microsoft Excel
Explorer
Windows Explorer
Firewall.cpl
Windows Firewall
Fonts
Fonts Folder Location
Fsmgmt.msc
Share Folders
Gpedit.msc
Local Group Policy editor
iexplore
Internet Explorer
Inetcpl.cpl
Internet Properties
Intl.cpl
Regional settings
Logoff
Windows Logoff
Lusrmgr.msc
Local Users and Groups
Magnify
Windows Magnifier
Mmsys.cpl
Sounds and Audio
Msconfig
System Configuration Utility
Msinfo32
System Information
Mspaint
Paint
Mstsc
Remote Desktop
Ncpa.cpl
Network Connections
Notepad
Notepad
Osk
On Screen Keyboard
Outlook
Microsoft Outlook
Perfmon
Performance Monitor
Powercfg.cpl
Power Configuration
Powerpnt
Microsoft Powerpoint
Regedit
Registry Editor
Services.msc
Services
Shutdown
Shut down Computer
Sysdm.cpl
System Properties
Sysedit
System Configuration Editor
Taskmgr
Taskmanager Window
telnet
Telnet client
Timedate.cpl
Date and Time
Utilman
Utility Manager
Verifier
Driver Verifier Utillity
Winword
Microsoft Word
Wmimgmt.msc
Windows Management Infrastructure
Wmplayer
Windows Media Player
Write
Wordpad
Wscui.cpl
Windows Action Center

Friday, February 19, 2016

Installing Hyper-V Manager in Windows 7

Hyper-V feature is not available in Windows 7. However it comes  builtin in Window 8, 8.1 and 10 professional and enterprise OS. You just have to enable the feature in 'Programs and features'.
            Hyper-V manager is used to run virtual machines on your local computer or another computer. This feature can be installed in Windows 7.
   

  • First you have to install the Remote Server Administrator Tool (RSAT) for Windows 7 from the below link

https://www.microsoft.com/en-us/download/details.aspx?id=7887


  • After installing RSAT restart the computer and go to the Control Panel.
  • In Control Panel, click on Programs and Features.
  • Click on the option Turn Windows features On or Off.
  • Go to Remote Server Administration Tools ---Role Administration Tools
  • Enable Hyper-V tools and click ok.
  • Restart the computer if required.
  • Hyper-V Manager will be availabe in Start---Administrative Tools

Saturday, August 8, 2015

Wifi not working after Windows 10 upgrade

Some times your wireless and wired network adapters may not work after upgrading to Windows 10. As per Microsoft the reason may be due to some VPN client softwares installed in your computer. Listed below are the troubleshooting steps. 

  1. Remove any VPN client software(Cisco, SonicWALL, Fortigate etc) installed in your computer before upgrading.
  2. If you have already upgraded try removing it. Mostly it won't work as it will show error while trying to uninstall. 
  3. Try uninstalling all the network adapters from device manager and reinstall again. 
  4. If it doesn't work the final step is to downgrade to Windows 8/7, uninstall the VPN Client software and upgrade to Windows 10 again. You can downgrade from recovery options. (Click on Start-Settings-Update and Security-Recovery)

Tuesday, August 4, 2015

Cannot send emails from Outlook after upgrading to Windows 10

After upgrading to Windows 10 you may experience problems with sending emails from Outlook. When you click on the Send/Receive button it may show the below message.

Error message: ‘ – Sending’ reported error (0x800CCC13): ‘Cannot connect to the network. Verify your network connection or modem’

To resolve this issue follow the below steps.

1. Right click on the Start button of Windows and choose: Command Prompt (Admin).
2. In the command prompt type : sfc /scannow
3. Wait until the process completes.
4. Restart the computer
5. Open Outlook and try sending mails again

Monday, June 22, 2015

Change Login Account to Local Account in Windows 8

While you are setting up Windows 8 for the first time, it may request to enter a Microsoft account. Using a Microsoft account as log in is useful if you are using multiple Windows 8 devices, as it lets you sync the information from one device to another. You can change your login to a local account on the PC if you are not using such features.

Changing to local account
1. Swipe your mouse to the right side of the desktop to open the windows charm.
2. Click on settings and open 'Change PC settings' on the bottom.
3.Click on accounts and then click on your account.

4. On the screen Click on the disconnect link for Microsoft account.
5. You will be requested for the password. Enter the password and create a local user account

Saturday, May 16, 2015

Error: An app on your PC needs the following windows feature

This error may appear when you are trying to install the .NET Framework 3.5 on windows 8 machine. Even if you click on install this feature it may fail to install the software.

Dialog box for 3.5 install on Windows 8

In this case please check if the windows updates KB2966826 & KB2966828 is installed under Control panel - Programs and Features - View installed updates. If any of these is installed, please uninstall these updates and try again.

Sunday, December 14, 2014

Unable to uninstall McAfee antivirus

This might happen if you are trying to uninstall your McAfee antivirus and installing a new antiviurs. Even if you remove from the add/remove programs, it might interrupt the installation of the new antivirus. For this situation you can use the McAfee Consumer Product removal tool (MCPR) for the complete uninstallation of the product. Click on the link below to download the software.
  
  Download, save to your computer and run the MCPR.

Analyze mail header

In Outlook 2013
1. Open your MS office Outlook account.
2. Double click on the mail that you want to view the Header
3. Click on 'File' option.
4. The click 'Info'
5. Then click on the 'Properties' tab.
6. In the new window, you can see the Internet headers.
7. Copy the complete address
8. We can use the MX tool box Email Header analyzer. Click on the link below to the page
9. Paste the header in to the space.
10. You can view various details, like the orginating IP, addresses, the various servers that the mail       has passed through, spam details etc.