How to change a certain parameter of all principled shaders in my blend file?
You would have to iterate through all materials, get their node trees and find the principled bsdf to set its default values. Demo on how to change the Metallic value for all materials in the file:
import bpy

for mat in bpy.data.materials:
    if hasattr(mat.node_tree, &quot;nodes&quot;):
        for node in mat.node_tree.nodes:
            if node.type == 'BSDF_PRINCIPLED':
                for input in node.inputs:
                    if input.name == 'Metallic':
                        input.default_value = 0.7

If you'd like to change another property of the principled shader, here is a complete list:
Alpha, Anisotropic, Anisotropic Rotation, Base Color, Clearcoat Clearcoat, Normal, Clearcoat Roughness, Emission, Emission Strength, IOR, Metallic, Normal, Roughness, Sheen Sheen Tint Specular, Specular Tint, Subsurface, Subsurface Color, Subsurface Radius, Tangent, Transmission, Transmission, Roughness.
Note that some of them are actually vectors (yellow and purple socket) so you'd have to assign a tuple instead. Demo on how to set the Base Color:
import bpy

for mat in bpy.data.materials:
    if hasattr(mat.node_tree, &quot;nodes&quot;):
        for node in mat.node_tree.nodes:
            if node.type == 'BSDF_PRINCIPLED':
                for input in node.inputs:
                    if input.name == 'Base Color':
                        input.default_value = (1.0, 0.0, 0.0, 1.0)

Further reading: What is the meaning of the color of the node sockets in the node editor?