def rule(event):
    if any(
        [
            event.deep_get("TargetFilename", default="").endswith(
                "\\Microsoft.PowerShell_profile.ps1"
            ),
            event.deep_get("TargetFilename", default="").endswith("\\PowerShell\\profile.ps1"),
            event.deep_get("TargetFilename", default="").endswith(
                "\\Program Files\\PowerShell\\7-preview\\profile.ps1"
            ),
            event.deep_get("TargetFilename", default="").endswith(
                "\\Program Files\\PowerShell\\7\\profile.ps1"
            ),
            event.deep_get("TargetFilename", default="").endswith(
                "\\Windows\\System32\\WindowsPowerShell\\v1.0\\profile.ps1"
            ),
            event.deep_get("TargetFilename", default="").endswith(
                "\\WindowsPowerShell\\profile.ps1"
            ),
        ]
    ):
        return True
    return False
