Reset Rotation , Translation and Scale of bones through Script
You can:

import bpy
from mathutils import Vector, Quaternion

arm = bpy.data.objects['Armature']

for pb in arm.pose.bones:
    #Set the rotation to 0
    identityQuaternion = Quaternion((0, 0, 0), 1 )
    pb.rotation_quaternion = identityQuaternion
    #Set the scale to 1
    pb.scale = Vector( (1, 1, 1) )
    #Set the location at rest (edit) pose bone position
    pb.location = pb.bone.head