Thursday, 5 September 2013

Unable to restore from Shadow Copy due to long filename?

The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation.

This Link has the solution. 

Command "SUBST" does the trick.

Thursday, 29 August 2013

Locate All DHCP Servers and their scopes in a Domain

Keeping Track of all DHCP servers and scopes in you Domain/Network is always challenging and Daunting at times, more so when you are serving more than 500 sites and 60,000 Domain user network.

Ever So Often i would be asked to Add a reservation for a Printer or Computer and will be given only the IP range it needs to go to. Considering the no.of sites my Company is spread across, it was always challenging to figure out the DHCP server for the Scope with out the Collaboration of the remote support teams. And so i came up with this workaround.

Open Command Prompt on Any PC on the Domain and enter the following command:

netsh dhcp show server

This will spit out all DHCP servers in the domain. The list can be quite extensive and you are better of setting the output to a file. Something like this:

netsh dhcp show server > C:\Temp\DHCP_SERVER.CSV

More due to lack of Command Prompt Filtering Skills i managed to use Excel formulas to extract the Ip addresses of all the servers and execute the following command:

 netsh dhcp server \\<Server IP Address> show scope > C:\Temp\DHCP_SCOPES.CSV

Researching if things have got any better in Power Shell.......
Introduction and Implementation of IPAM in Windows Server 2012 resolves this issue which has long been pestering the Windows Domains.

At this stage this is what i found with regards to PowerShell.
Follow Instruction to gather the DHCP modules as detailed in this technet Link by JeremyEngelWork. Awesome Work!!!.

Show-DHCPServers | Select Server 

Gives the list of Active DHCP Servers in the Domain (Still need to Figure out how to Pipe it the command below without using Excel Concatenation)

Get-DHCPScope -Server <Server FQDN>

Pipe the Output to a csv (Export-CSV) and you are Done.

PowerShell is AWESOME.......... 

Wednesday, 17 July 2013

Print Queue Issues with Type 4 Drivers in Windows Server 2012 with respect Security Permissions

Leave in the "Creator Owner" Group and the "Everyone" Group at the root level in Print management security permissions on the Windows Server 2012( may also apply to Server 2008 and R2 for Type 3 drivers - not tested) to avoid any issues with Client Computers not being able to print from the server print queue.

Creator Owner should be able to Manage Documents - only
Everyone should have Print permissions - only

Issue noticed:
On some Printers, The job will reach the queue on server from the client and the server process the job as completed but nothing comes out of the printer. No errors or alerts are noticed on the client side.  

Friday, 13 July 2012

Manage quotas from CMD line using "dirquota" in windows file servers

net share  or dirquota quota list | Find "Quota Path:" --**to get list of shares and paths on the server.

dirquota quota list /Status:Disabled --** to find disabled quotas on the file server



dirquota template list | Find "Template Name:" --** list of templates existing on the server


Dirquota q l /Path:path | find "Source Template:"

Dirquota Quota Modify /Path:PATH /Type:Hard /SourceTemplate:TEMPLATE
** the above command still needs to be tested as the last time i had a chance to test briefly it failed.
in the above CMD the /Type:Hard need not be specified as these settings can be configured in Templates.
the correct usage when making use of templates the above command would be

dirquota q m /Path:PATH /SourceTemplate:Template
** If the template created has spaces in it's name you can use them in closed aporstaphes 
    Ex: dirquota q m /Path:PATH /SourceTemplate:"Template Name"

Wednesday, 11 July 2012

How to run console as admin from normal user account in Windows

Why would anyone want to do this?

A good Philosophy the Company I work for has taken is (Most companies do and I think everyone should ) to use your normal (restricted/less privileged) account for all duties and elevate or use an Admin account only when/where required.

Assuming you are in the Command window you can use the following syntax:

runas /user:{<Domain>\<Adminusername>} mmc

Hope You find this useful.

Regards,
Manny

Tuesday, 10 July 2012

Keyboard shortcut for Outlook to Auto Complete user id's or email addresses

CRTL+K
Works when the address book is populated by exchange global contact list or the default contact list.

DHCP Servers and Network Issues

Whenever Help Desk/Service Desk raise a job as a Network Issue for the networks team, (depending on the Organization structure ) it could very well be a Server Issue if the DHCP service on the server is not responding, and Networks will bounce back the job to Service desk to assignn it to the Server team.