Mostrando entradas con la etiqueta Operating Systems. Mostrar todas las entradas
Mostrando entradas con la etiqueta Operating Systems. Mostrar todas las entradas

miércoles, 2 de febrero de 2011

Disk CleanUp in Windows Server 2008

If you had have an space problem in a Windows Server 2008 or Windows Server 2008 R2 server and you tried to use Disk CleanUp tool you have checked that it is not present in any of these Operating Systems. This tool is one of the most useful that is included in Windows server from several versions ago; you can use it to delete temp, logs or thumbnails files in a very useful and quick manner.

But don’t worry, tool is present in 2008 but Microsoft has decided to hide it for any reason that escape to my mind…

In order to use cleanmgr.exe you need to copy it and cleanmgr.exe.mui file to a different location. The first step is to locate both files, depending on your Windows 2008 version you can find them in the following paths:

Operating System Architecture File Location
Windows Server 2008 R2 64-bit C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe
Windows Server 2008 R2 64-bit C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui
Windows Server 2008 64-bit C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_b9f50b71510436f2\cleanmgr.exe.mui
Windows Server 2008 64-bit C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_c962d1e515e94269\cleanmgr.exe.mui
Windows Server 2008 32-bit C:\Windows\winsxs\x86_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_5dd66fed98a6c5bc\cleanmgr.exe.mui
Windows Server 2008 32-bit C:\Windows\winsxs\x86_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_6d4436615d8bd133\cleanmgr.exe

image

image

 

Then move them to the following locations:

  • Cleanmgr.exe to %systemroot%\System32
  • Cleanmgr.exe.mui to %systemroot\System32\en-US

Now you can run cleanmgr.exe from the command prompt or by clicking Start and typing cleanmgr in the Search bar.

Continue Reading...

jueves, 21 de octubre de 2010

SharpBits.NET Tool

If you search on the web you can find many free tools that you can use to work with BITS. As we commented in other blog, BITS has an API in .NET that you can use to create web or form applications to work with BITS. I have downloaded and tested many of them and I can ensure you that you will find the one you are searching, all of them are very easy to use and some of them are very powerfull too but I like one that is very, very simple to use and has a very intuitive interface (perfect for my customers), it is SharpBITS.NET

To download the installer you have to go to www.codeplex.com site, search by “sharpbits.net” and select the first result:

image

On the SharpBITS.NET page click on Download button on the right, click on I Accept button to accept the license and save the .zip file in your machine:

image

Extract the .zip file, for example, in D drive. A folder named SharpBITS will be created with the following content:

image

Now you just need to double click SharpBITS.exe file to load the tool:

image

To create a new BITS job, right click on Name column to display the context menu. Select Add new job and then Upload or Download depending of the action you want to execute (on this example we have selected Upload):

image

A new window named Upload (or Download) is displayed, and Files tab is selected:

image

Double click on the job named Upload to open the Add File window:

image

Type the URL of your BITS server and the file name, and type the local path and file name (this section is identical if you selected Upload or Download):

image

Click Add button to add the job.

image

Then select Authentication tab, type your Enterprise ID in User Name field, type your Password, select SERVER as Authentication Target and NTLM as Authentication Scheme (we have enable Integrated Windows Authentication in our BITS servers), and click Add button:

image

On Messages tab we could see the message generated by our job when we execute it:

image

On the Details tab, you can select the Priority of your job (by default it is Normal), and then click on Resume to run your job and start the upload/download process:

image

SharpB ITS will starts the connection with the server:

image

If something is wrong the state will change to TransferError. Select Messages tab to see the error message generated (in this example we have typed a bad URL and SharpBITS tool can’t find it):

image

If it is all right, the Status field will change to Transferring, and if you close the Upload (or Download) window, you could see the Progress of your job:

image

During the execution you can select the job, right click on it and, on the context menu, change the Priority of the job:

image

image

You can Suspend the job and Resume it when you want using this context menu:

image

image

When the file has been uploaded (or downloaded) completely, Job appears with this format:

image

And the transfer is complete.

Enjoy it!

Continue Reading...

jueves, 16 de septiembre de 2010

BITS + PowerShell: Get the power!

Following with the methods to work with BITS, if your machine is running Windows 7 or you are uploading/downloading files from a Windows 2008 Server, you can use PowerShell commands to work with BITS in the same that we have used the bitsadmin.exe tool.

In this case, we will download an installer file stored in a BITS server to our Windows 2008 server, so the first step is to open the PowerShell window an import the Bits Transfer module:

Import-Module BitsTransfer

Now, a good way to know all the command (or cmdlets) we can use to work with Bits is to run the following command:

Get-Command –Module BitsTransfer

All commands and definitions are displayed:

clip_image002

It seems that the cmdlet that we need is Start-BitsTransfer. If you are not sure, you can run the following command to get a complete description about this cmdlet:

Get-Help Start-BitsTransfer

A complete description including syntax is displayed:

clip_image004

As you can see on the REMARKS section you can use other commands to get more information about this cmdlet. One of these commands is the –examples one:

Get-Help Start-BitsTransfer –examples

You can see 8 different examples about how to use this command to create a Bits job and download/upload files. We will use the following one to download our installer:

Start-BitsTransfer -Source https://myserver.domain.com/SQL2008R2.iso -Destination D:\Installers\SQL2008R2.iso

A green box will appear while you connect with BITS server and download the file:

clip_image006

And a status bar will appear between [ and ] symbols. Evidently, if you are trying to upload/download a file to a protected BITS server, you have to specify your credentials and authentication method in the PowerShell command. You can do it in the following way:

Start-BitsTransfer -Source https://myserver.domain.com/SQL2008R2.iso -Destination D:\Installers\SQL2008R2.iso -Authentication NTLM -Credential "domain\myID"

When you click Enter an authentication window will appears requesting you your password.

As a summary, we need to execute just two PowerShell commands to download a file from a BITS server:

Import-Module BitsTransfer

Start-BitsTransfer -Source <url or path> -Destination <url or path> -Authentication [NTLM, Basic, etc.] -Credential "domain\myID" -TransferType [Upload/Download]

If we want to upload a file the command to use is very similar to the download one but adding the parameter TransferType:

Start-BitsTransfer -Source <url or path> -Destination <url or path> -TransferType <Upload>

As you can see on the examples, you can do the same in many ways playing with the 8 commands that BitsTransfer module offers to us and the rest of commands included in PowerShell.

Next post…How to work with BITS using a GUI tool.

Continue Reading...

martes, 14 de septiembre de 2010

BITS command-line

One of the ways to upload/download files to a BITS server is using its command line tool, bitsadmin. You have not confuse this command line with the PowerShell cmdlets that you can use in Windows 7 and 2008. Bitsadmin.exe tool is included by default in Windows XP Service Pack 2, Windows Vista and Windows 2003 Server.

To use it you have to open a cmd console and type the commands you want to use. Bitsadmin uses switches to identify the work to perform, the process is very simple: create a job, enter the different parameters (source, destination, user, etc.) and execute the job.

To upload a file, open a CMD window, type the following sentence and click Enter:

Bitsadmin /create /upload <jobName>

Bitsadmin /create /upload UploadISO

A message similar to that will be displayed showing the ID assigned to the job created

image

Now you have your upload job created so next step is to add to it the file to upload, type a command similar to this one:

Bitsadmin /addfile <jobName> <destination> <file_to_upload>

Bitsadmin /addfile UploadISO https://myServer/ED/SQLR2.iso D:\ISO\SQL_R2.ISO

Now we can add our credentials to the job in case our BITS site implements security:

Bitsadmin /setcredentials <jobName> <authenticationTarget> <authenticationScheme> <user> <password>

Bitsadmin /setcredentials UploadISO SERVER NEGOTIATE dir\myAccount myP@ssword

image

Now we can put, for example, the priority for our job:

Bitsadmin /priority <jobName> <HIGH, NORMAL, LOW, FOREGROUND>

Bitsadmin /priority UploadISO HIGH

image

And now we can run our upload job with /resume or /transfer commands:

Bitsadmin /resume UploadISO

Or

Bitsadmin /transfer UploadISO

As you can guess, playing with the different switch you can create and execute a job using just 2 or 3 lines. For example, you could execute the following lines:

Bitsadmin /create UploadR2

Bitsadmin /transfer UploadR2 /upload /priority HIGH https://myServer/ED/SQLR2.iso D:\ISOs\SQLServer2008_R2.ISO

And evidently if you want to download a file instead to upload it, you have to use the switch /download instead of the /upload one.

Bitsadmin /transfer UploadR2 /download /priority HIGH https://myServer/ED/SQL2008R2.iso C:\Installers\mySQLInstaller.ISO

You can get a complete description of the available switch typing:

Bitsadmin /help

Or

Bitsadmin /?

Also you can get a text version on this link from Microsoft MSDN site: http://msdn.microsoft.com/en-us/library/aa362813(VS.85).aspx

But Bitsadmin.exe is not the only tool we can use to work with BITS, we can use PowerShell and/or some free tools that we will see in the next posts.

Continue Reading...

jueves, 9 de septiembre de 2010

How to enable BITS in Windows 2008

Like everything in IIS 7, the implementation of BITS service is totally different than in IIS 6. To enable it, open the Management console and click on Features:

image

Features Summary list will appears, click on Add Features link on the right:

image

image

On the Add Features wizard select the following elements:

  • Background Intelligent Transfer Service (BITS)
    • Compact Server
    • IIS Server Extension

image

Click Next.

image

And Install.

image

When process is finished, click Close

image

Now, if you go to IIS Manager console and select your web site, you can see that you have a new feature installed above the Other section name BITS Uploads:

image

Double click on the BITS Uploads icon to enable and configure it

image

Select Allow clients to upload files to enable BITS on this web site, and select Customize settings if you want to modify the default ones. Additionally to the options that we have in IIS 6 we have some new ones like the maximum file size

image

Send notifications to a URL each time a job is completed

image

To limit the number of sessions per user

image

Or enable server farm support.

When you finished, click on Apply link. Like in IIS6 the BITS structure will be created on the web site:

image  image

Now you can to proceed in the same way than Windows 2003. You can create a new folder and grant access to it to the security groups than you wont. Then go to the IIS Manager console, click on your web site and select Add Virtual Directory link:

image

Type an alias for the Virtual Directory, point it to the folder created on the last step and click OK to add it to your site:

image

Now you can upload/download files to this folder using a URL similar to that:

     https://mybitswebsite.mycia.com/uploads

Well, now we are ready to talk about how to upload/download files.

Continue Reading...

miércoles, 8 de septiembre de 2010

How to enable BITS in Windows 2003

Following with the BITS series, the next step, after to explain what BITS is and how we can implement it, is to explain how to enable it in our server. We will implement it on Windows 2003 on this post and on Windows 2008 on the next one.

To enable BITS in your Windows 2003 Server, you have to follow these steps:

  • Open Add or Remove Programs
  • Click on Add/Remove Windows Components
  • Select Application Server and click on Details

image

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  • Select Internet Information Server (IIS) and click on Details

image

  • Select Background Intelligent Transfer Service (BITS) Server Extensions

image

  • Click on Details button to ensure that BITS Management Console Snap-in and BITS Server Extension ISAPI are selected:

image

  • Click OK, OK, OK and Next. The installation progress will start; click Finish when it is finished

Now you have to go to IIS Manager console and create a new web application named, for example, BITS. We will use a dedicated IP address and SSL certificate for this site. Now, if you right click on the new web site and select Properties, you can see that you have a new tab named “BITS Server Extension”:

image

To enable BITS on this site, select “Allow clients to transfer data to this virtual directory”, Select “Customize Settings” option and “Delete incomplete jobs after”. Enter a value in days to delete the incomplete jobs, and click Apply.

Select Home Directory tab and ensure that Read and Write options are selected:

image

And on Directory Security tab you have to select “Integrated Windows authentication” and ensure that “Enable anonymous access” is unchecked:

image

Note: BITS works perfectly with Anonymous access and without SSL certificates installed (using HTTP protocol), but in this case we will try to make the security our main requirement.

Now, go to the Windows Explorer and create a folder where to leave the uploaded files, named, for example, Uploads. Right click on the folder and select Properties. On the Security tab, remove all the groups on the list except the Administrators one, and join the security group that need to upload/download files to this folder.

Now on IIS, below the BITS web site, create a virtual directory that points to the folder created in the last point.

Now you can download/upload files to this folder using a URL similar to that:

https://myBITSwebsite.mycia.com/uploads

Now the next point is how to upload/download the files, but before that we will see how to implement BITS in Windows 2008.

Continue Reading...

Project Mgmt. Professional

Project Mgmt. Professional

AWS Architect

AWS Architect

ITIL Fundamentals

ITIL Fundamentals