Nonequilibrium properties of trapped ions under sudden application of a laser